Skip to content

Commit

Permalink
fix(ci): fix packaging check merge operation (#5750)
Browse files Browse the repository at this point in the history
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: d8432ed - 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
  • Loading branch information
aciba90 committed Sep 27, 2024
1 parent 9491566 commit bbe6191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/packaging-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit bbe6191

Please sign in to comment.