-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (61 loc) · 1.67 KB
/
pr.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
name: check pr
on:
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run lint
actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run actions
- run: |
git diff --name-only -- "actions/**/*.js" | xargs --no-run-if-empty git diff --exit-code -- \
|| (echo "Change to actions detected, please run 'npm run actions' and commit the changes" && false)
workflows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run workflows
- run: |
git diff --name-only -- ".github/workflows/*.yml" | xargs --no-run-if-empty git diff --exit-code -- \
|| (echo "Change to workflows detected, please run 'npm run workflows' and commit the changes" && false)
test:
runs-on: ubuntu-latest
needs:
- lint
- actions
- workflows
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npm run ci-test
check-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}