Skip to content

Commit

Permalink
Add the checkout ref for incorporating PR
Browse files Browse the repository at this point in the history
Since we moved to using pull_request_target which executes the
workflow in the context of the base repository but the default HEAD
that gets checked out is now the main branch rather than the PR.
This ensures the pull request HEAD is checked out before running the
workflow.
  • Loading branch information
thunderboltsid committed Jul 8, 2024
1 parent 0873719 commit 4186024
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"

- name: Install devbox
uses: jetify-com/devbox-install-action@v0.11.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/synopsys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"

- name: Install devbox
run: curl -fsSL https://get.jetpack.io/devbox | bash -s -- -f
Expand Down

0 comments on commit 4186024

Please sign in to comment.