From 0ad298895ee330912147603fa5627c2d4942b5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 7 Jul 2023 17:52:39 +0200 Subject: [PATCH] gha: ci: Fix refernce passed to checkout@v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On cc3993d860339f4fcf669429a9e5948755dfaa75 we introduced a regression, where we started passing inputs.commit-hash, instead of github.event.pull_request.head.sha. However, we have been setting commit-hash to github.event.pull_request.sha, meaning that we're mssing a `.head.` there. github.event.pull_request.sha is empty for the pull_request_target event, leading the CI to pull the content from `main` instead of the content from the PR. Fixes: #7247 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/ci-on-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-on-push.yaml b/.github/workflows/ci-on-push.yaml index 418d04650..76c4dc38d 100644 --- a/.github/workflows/ci-on-push.yaml +++ b/.github/workflows/ci-on-push.yaml @@ -17,7 +17,7 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} uses: ./.github/workflows/ci.yaml with: - commit-hash: ${{ github.event.pull_request.sha }} + commit-hash: ${{ github.event.pull_request.head.sha }} pr-number: ${{ github.event.pull_request.number }} tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} secrets: inherit