-
-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (43 loc) · 1.67 KB
/
pr-commenter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Pull Request Commenter
on:
# pull_request_target required for pull-requests:write permission on fork PRs
pull_request_target:
types:
# - edited # PR's base branch was changed
- opened
- reopened
- synchronize # PR's branch was edited (i.e. new commits)
paths:
- '*'
- 'src/**'
- 'test/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
npm-exec-test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ ubuntu, macos, windows ]
steps:
- uses: volta-cli/action@v4
- env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: npm exec --loglevel verbose --yes -- "github:${{ github.event.pull_request.head.repo.full_name }}#${HEAD_REF}" --help
npm-exec:
needs:
- npm-exec-test
runs-on: ubuntu-latest
steps:
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
## :test_tube: Branch testing instructions
This pull request can be tested locally with the following command:
```shell
npm exec --yes -- "github:${{ github.event.pull_request.head.repo.full_name }}#${{ github.event.pull_request.head.ref }}" [commands..] [options]
```
_Comment generated by the [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}) workflow._
comment_tag: npm-exec