ci: fix PR checkouts on arch and flatpak (#5391)
This commit is contained in:
9
.github/workflows/ci-archlinux.yml
vendored
9
.github/workflows/ci-archlinux.yml
vendored
@@ -21,8 +21,13 @@ jobs:
|
|||||||
_support_headless_testing: true
|
_support_headless_testing: true
|
||||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||||
BUILD_VERSION: ${{ inputs.release_version }}
|
BUILD_VERSION: ${{ inputs.release_version }}
|
||||||
CLONE_URL: ${{ github.event.repository.clone_url }}
|
CLONE_URL: >-
|
||||||
COMMIT: ${{ inputs.release_commit }}
|
${{
|
||||||
|
github.event_name == 'pull_request' &&
|
||||||
|
github.event.pull_request.head.repo.clone_url ||
|
||||||
|
github.event.repository.clone_url
|
||||||
|
}}
|
||||||
|
COMMIT: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || inputs.release_commit }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
8
.github/workflows/ci-flatpak.yml
vendored
8
.github/workflows/ci-flatpak.yml
vendored
@@ -128,6 +128,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
INPUT_RELEASE_VERSION: ${{ inputs.release_version }}
|
INPUT_RELEASE_VERSION: ${{ inputs.release_version }}
|
||||||
INPUT_RELEASE_COMMIT: ${{ inputs.release_commit }}
|
INPUT_RELEASE_COMMIT: ${{ inputs.release_commit }}
|
||||||
|
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
|
||||||
|
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||||
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
REPOSITORY_CLONE_URL: ${{ github.event.repository.clone_url }}
|
REPOSITORY_CLONE_URL: ${{ github.event.repository.clone_url }}
|
||||||
run: |
|
run: |
|
||||||
# variables for manifest
|
# variables for manifest
|
||||||
@@ -139,6 +142,11 @@ jobs:
|
|||||||
if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
|
if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
|
||||||
echo "This is a PUSH event"
|
echo "This is a PUSH event"
|
||||||
branch="${GITHUB_REF_NAME}"
|
branch="${GITHUB_REF_NAME}"
|
||||||
|
elif [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then
|
||||||
|
echo "This is a PR event"
|
||||||
|
branch="${PR_HEAD_REF}"
|
||||||
|
commit="${PR_HEAD_SHA}"
|
||||||
|
clone_url="${PR_CLONE_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Branch: ${branch}"
|
echo "Branch: ${branch}"
|
||||||
|
|||||||
2
.github/workflows/ci-homebrew.yml
vendored
2
.github/workflows/ci-homebrew.yml
vendored
@@ -110,6 +110,7 @@ jobs:
|
|||||||
MATRIX_RELEASE: ${{ matrix.release }}
|
MATRIX_RELEASE: ${{ matrix.release }}
|
||||||
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
|
PR_CLONE_URL: ${{ github.event.pull_request.head.repo.clone_url }}
|
||||||
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||||
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
|
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
|
||||||
REPOSITORY_CLONE_URL: ${{ github.event.repository.clone_url }}
|
REPOSITORY_CLONE_URL: ${{ github.event.repository.clone_url }}
|
||||||
REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||||
@@ -132,6 +133,7 @@ jobs:
|
|||||||
echo "This is a PR event"
|
echo "This is a PR event"
|
||||||
clone_url=${PR_CLONE_URL}
|
clone_url=${PR_CLONE_URL}
|
||||||
branch="${PR_HEAD_REF}"
|
branch="${PR_HEAD_REF}"
|
||||||
|
commit="${PR_HEAD_SHA}"
|
||||||
default_branch="${PR_DEFAULT_BRANCH}"
|
default_branch="${PR_DEFAULT_BRANCH}"
|
||||||
tag="${PR_HEAD_REF}"
|
tag="${PR_HEAD_REF}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user