From bbe6191ca8680f26fe8b36d6964e654d0b587fdb Mon Sep 17 00:00:00 2001 From: Alberto Contreras Date: Fri, 27 Sep 2024 14:44:48 +0200 Subject: [PATCH] fix(ci): fix packaging check merge operation (#5750) github.sha does not always points to the last commit in the source branch of a PR, leading to errors like the following one while performing: $ git merge ${{ github.sha }} merge: d8432eda1ea1c722f6ff635f06c5f1d9c694a46f - not something we can merge Use github.event.pull_request.head.sha instead. See [1, 2] for more context: - [1] https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request - [2] https://github.com/orgs/community/discussions/26325 --- .github/workflows/packaging-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/packaging-tests.yml b/.github/workflows/packaging-tests.yml index 3d998a7c6da..5b48c2eddac 100644 --- a/.github/workflows/packaging-tests.yml +++ b/.github/workflows/packaging-tests.yml @@ -40,7 +40,7 @@ jobs: run: | git config user.name "GitHub Actions" git config user.email "actions@github.com" - git merge ${{ github.sha }} + git merge "${{ github.event.pull_request.head.sha }}" - name: Quilt patches apply successfully and tests run run: |