From 634accc05e23dc3546aa2bc64618fd59564fdabd Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 2 Feb 2024 14:02:07 +0100 Subject: [PATCH] github-action: pull_request_target event condition 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. --- .github/workflows/bench-diff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bench-diff.yml b/.github/workflows/bench-diff.yml index 0683a910..c8e1200d 100644 --- a/.github/workflows/bench-diff.yml +++ b/.github/workflows/bench-diff.yml @@ -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"