Skip to content

Commit

Permalink
github-action: pull_request_target event condition
Browse files Browse the repository at this point in the history
I got confused with the event name versus the event object.

This should help with using the right sha commit rather than the sha commit from the main, regardless.
  • Loading branch information
v1v authored Feb 2, 2024
1 parent 9331ad0 commit 634accc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/bench-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id: event
run: |
echo "DEBUG: event type(${{ github.event_name }})"
if [ "${{ github.event_name != 'pull_request' }}" = "true" ] ; then
if [ "${{ github.event_name != 'pull_request_target' }}" = "true" ] ; then
echo "ref=${{ github.sha }}" >> "$GITHUB_OUTPUT"
else
echo "ref=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 634accc

Please sign in to comment.