Skip to content

Commit

Permalink
CI: Update for detached HEAD state
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Mar 12, 2024
1 parent 4843791 commit 9603fa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/dev-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
if : ${{ github.event_name == 'pull_request_target' }}
shell: pwsh
run: |
$previous_commit = git rev-parse 'HEAD^'
$commits = git log -n 2 --pretty=format:%H
$previous_commit = $commits[1]
if ($previous_commit -ne "${{ github.event.pull_request.head.sha }}") {
throw "The pull request head commit has changed since the event was triggered."
}
Expand Down

0 comments on commit 9603fa0

Please # to comment.