Skip to content

Commit

Permalink
chore(ci): check out PR code for acceptance testing (#381)
Browse files Browse the repository at this point in the history
When I updated the acceptance test workflow to allow them to run against
external PRs (by using the `pull_request_target` trigger), I forgot to
update the workflow to actually check out the PR. The
`pull_request_target` workflow runs in the context of the base branch,
so if it isn't explicitly told to check out something else, it will
check out and run the tests from `main` instead of from the PR.
  • Loading branch information
ctreatma authored Sep 15, 2023
2 parents 973fdaa + d4df80d commit 4bed691
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/acctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set up Go
uses: actions/setup-go@v4
Expand Down

0 comments on commit 4bed691

Please sign in to comment.