Skip to content

Commit 9fb2e90

Browse files
committed
Add steps to checkout the PR branch
1 parent 1fb5727 commit 9fb2e90

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/validate.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,32 @@ on:
77
jobs:
88
sfp-validate-pool:
99
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
1012
if: >
1113
github.event.issue.pull_request &&
1214
(
1315
contains(github.event.comment.body, '/quick-validation') ||
1416
contains(github.event.comment.body, '/full-validation')
1517
)
1618
steps:
17-
- name: Checkout
19+
- name: Fetch Branch Name
20+
id: fetch-branch-name
21+
uses: xt0rted/pull-request-comment-branch@v2
22+
23+
- name: Check out code from ${{ steps.fetch-branch-name.outputs.head_ref }}
1824
uses: actions/checkout@v3
25+
with:
26+
ref: ${{ steps.fetch-branch-name.outputs.head_ref }}
27+
28+
- name: Post response to GitHub PR
29+
uses: mshick/add-pr-comment@v2
30+
with:
31+
message: |
32+
Action started. Click [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see the status.
33+
34+
# - name: Checkout
35+
# uses: actions/checkout@v3
1936

2037
- name: Validate
2138
run: |
@@ -31,19 +48,7 @@ jobs:
3148
fi
3249
3350
34-
35-
36-
37-
38-
39-
40-
41-
42-
43-
44-
45-
46-
51+
4752

4853

4954

0 commit comments

Comments
 (0)