2626 runs-on : ubuntu-latest
2727 outputs :
2828 condition : ${{ steps.check.outputs.condition }}
29+ ref : ${{ steps.check.outputs.ref }}
2930 steps :
3031 - name : Check if PR is from external contributor
3132 id : check
4546 else
4647 echo "condition=pr-creation-maintainer" >> $GITHUB_OUTPUT
4748 echo "Setting condition=pr-creation-maintainer (internal PR creation)"
49+ echo "ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
4850 fi
4951 elif [ "${{ github.event_name }}" == "repository_dispatch" ]; then
5052 # For repository_dispatch events (ok-to-test), check if sha matches
@@ -58,13 +60,15 @@ jobs:
5860 if [ -n "$SHA_PARAM" ] && [[ "$PR_HEAD_SHA" == *"$SHA_PARAM"* ]]; then
5961 echo "condition=dispatch-event" >> $GITHUB_OUTPUT
6062 echo "Setting condition=dispatch-event (sha matches)"
63+ echo "ref=$PR_HEAD_SHA" >> $GITHUB_OUTPUT
6164 else
6265 echo "condition=skip" >> $GITHUB_OUTPUT
6366 echo "Setting condition=skip (sha does not match or empty)"
6467 fi
6568 elif [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_name }}" == "main" ]; then
6669 echo "condition=push-to-main" >> $GITHUB_OUTPUT
6770 echo "Setting condition=push-to-main (push to main)"
71+ echo "ref=${{ github.sha }}" >> $GITHUB_OUTPUT
6872 else
6973 # Unknown event type
7074 echo "condition=skip" >> $GITHUB_OUTPUT
8084 ||
8185 needs.check-external-pr.outputs.condition == 'push-to-main'
8286 uses : ./.github/workflows/e2e-tests.yml
87+ with :
88+ ref : ${{ needs.check-external-pr.outputs.ref }}
8389 secrets :
8490 OP_CONNECT_CREDENTIALS : ${{ secrets.OP_CONNECT_CREDENTIALS }}
8591 OP_CONNECT_TOKEN : ${{ secrets.OP_CONNECT_TOKEN }}
0 commit comments