We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 481e583 + c48d525 commit 007297eCopy full SHA for 007297e
.github/workflows/mend.yml
@@ -6,13 +6,26 @@ on:
6
pull_request_target:
7
types:
8
- opened
9
+ - synchronize
10
workflow_dispatch:
11
12
jobs:
13
mend:
14
runs-on: ubuntu-latest
15
steps:
16
+ # If we are on a PR, checkout the PR head sha, else checkout the default branch
17
+ - name: "Set the checkout ref"
18
+ id: set_ref
19
+ run: |
20
+ if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
21
+ echo "ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
22
+ else
23
+ echo "ref=${{ github.ref }}" >> $GITHUB_OUTPUT
24
+ fi
25
+
26
- uses: actions/checkout@v4
27
+ with:
28
+ ref: ${{ steps.set_ref.outputs.ref }}
29
30
- name: 'setup node: 18 platform: ${{ runner.os }}'
31
uses: actions/setup-node@v4
0 commit comments