Skip to content

Commit

Permalink
fix pr checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jan 5, 2024
1 parent d28ffe0 commit b3a9082
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/validate-new-contributor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ jobs:
outputs:
email-address: ${{ steps.output-email-address.outputs.EMAIL_ADDRESS }}
steps:
- name: Set Pull Request Number
run: |
if [ "${{ github.event_name }}" == "pull_request" ]
then
echo "PR_NUM=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
else
echo "PR_NUM=${{ inputs.pull-request-number }}" >> $GITHUB_ENV
fi
- name: 🛫 Checkout
uses: actions/checkout@v4

- name: 🛫 Checkout Pull Request
if: github.event_name != 'pull_request'
run: gh pr checkout ${{ inputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
ref: refs/pull/${{ env.PR_NUM }}/head

- uses: ocadotechnology/codeforlife-workspace/.github/actions/python/setup-environment@new_contributor_validations # TODO: use @main
with:
Expand Down

0 comments on commit b3a9082

Please sign in to comment.