File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 88jobs :
99
1010 mend :
11- if : github.event.pull_request.head.repo.full_name == github.repository
1211 runs-on : " ubuntu-latest"
13-
14- env :
15- BUNDLE_WITHOUT : release_prep
16-
1712 steps :
13+ # If we are on a PR, checkout the PR head sha, else checkout the default branch
14+ - name : " Set the checkout ref"
15+ id : set_ref
16+ run : |
17+ if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
18+ echo "ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
19+ else
20+ echo "ref=${{ github.ref }}" >> $GITHUB_OUTPUT
21+ fi
1822
1923 - name : " checkout"
2024 uses : " actions/checkout@v4"
2125 with :
2226 fetch-depth : 1
27+ ref : ${{ steps.set_ref.outputs.ref }}
2328
2429 - name : " setup ruby"
2530 uses : " ruby/setup-ruby@v1"
You can’t perform that action at this time.
0 commit comments