ref:0131793f969139954afc111c43930882495256e1

ci: fix PR checkouts on arch and flatpak (#5391)

SHA: 0131793f969139954afc111c43930882495256e1
Author: Dave Lane <42013603+ReenigneArcher@users.noreply.github.com>
Date: 2026-07-08 18:03
Parents: 6dc9751
3 files changed +17 -2
Type
.github/workflows/ci-archlinux.yml +7 −2
@@ -21,8 +21,13 @@
_support_headless_testing: true
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ inputs.release_version }}
CLONE_URL: ${{ github.event.repository.clone_url }}
COMMIT: ${{ inputs.release_commit }}
CLONE_URL: >-
${{
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:
contents: read
runs-on: ubuntu-latest
.github/workflows/ci-flatpak.yml +8 −0
@@ -128,6 +128,9 @@
env:
INPUT_RELEASE_VERSION: ${{ inputs.release_version }}
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 }}
run: |
# variables for manifest
@@ -139,6 +142,11 @@
if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
echo "This is a PUSH event"
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
echo "Branch: ${branch}"
.github/workflows/ci-homebrew.yml +2 −0
@@ -110,6 +110,7 @@
MATRIX_RELEASE: ${{ matrix.release }}
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 }}
PR_DEFAULT_BRANCH: ${{ github.event.pull_request.head.repo.default_branch }}
REPOSITORY_CLONE_URL: ${{ github.event.repository.clone_url }}
REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
@@ -132,6 +133,7 @@
echo "This is a PR event"
clone_url=${PR_CLONE_URL}
branch="${PR_HEAD_REF}"
commit="${PR_HEAD_SHA}"
default_branch="${PR_DEFAULT_BRANCH}"
tag="${PR_HEAD_REF}"
fi