diff --git a/.github/workflows/ci-archlinux.yml b/.github/workflows/ci-archlinux.yml index e64cb9a02..b7c98e061 100644 --- a/.github/workflows/ci-archlinux.yml +++ b/.github/workflows/ci-archlinux.yml @@ -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 diff --git a/.github/workflows/ci-flatpak.yml b/.github/workflows/ci-flatpak.yml index 95f428e84..69a6542ff 100644 --- a/.github/workflows/ci-flatpak.yml +++ b/.github/workflows/ci-flatpak.yml @@ -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}" diff --git a/.github/workflows/ci-homebrew.yml b/.github/workflows/ci-homebrew.yml index cdf487cb2..472952576 100644 --- a/.github/workflows/ci-homebrew.yml +++ b/.github/workflows/ci-homebrew.yml @@ -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