mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-08-07 10:20:46 +00:00
ci: fix PR checkouts on arch and flatpak (#5391)
This commit is contained in:
@@ -21,8 +21,13 @@ jobs:
|
||||
_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
|
||||
|
||||
@@ -128,6 +128,9 @@ jobs:
|
||||
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 @@ jobs:
|
||||
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}"
|
||||
|
||||
@@ -110,6 +110,7 @@ jobs:
|
||||
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 @@ jobs:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user