File tree Expand file tree Collapse file tree 3 files changed +38
-28
lines changed Expand file tree Collapse file tree 3 files changed +38
-28
lines changed Original file line number Diff line number Diff line change 23
23
runs-on : ubuntu-22.04
24
24
steps :
25
25
- name : validate
26
- uses : actions/github-script@v6
26
+ uses : actions/github-script@v7
27
27
with :
28
28
script : |
29
29
// See https://gist.github.com/marcojahn/482410b728c31b221b70ea6d2c433f0c#file-conventional-commit-regex-md
Original file line number Diff line number Diff line change 30
30
31
31
steps :
32
32
- name : Checkout repository
33
- uses : actions/checkout@v2
33
+ uses : actions/checkout@v4
34
34
with :
35
35
# We must fetch at least the immediate parents so that if this is
36
36
# a pull request then we can checkout the head.
43
43
44
44
# Initializes the CodeQL tools for scanning.
45
45
- name : Initialize CodeQL
46
- uses : github/codeql-action/init@v1
46
+ uses : github/codeql-action/init@v3
47
47
with :
48
48
languages : ${{ matrix.language }}
49
49
# If you wish to specify custom queries, you can do so here or in a config file.
54
54
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
55
# If this step fails, then you should remove it and run the build manually (see below)
56
56
- name : Autobuild
57
- uses : github/codeql-action/autobuild@v1
57
+ uses : github/codeql-action/autobuild@v3
58
58
59
59
# ℹ️ Command-line programs to run using the OS shell.
60
60
# 📚 https://git.io/JvXDl
68
68
# make release
69
69
70
70
- name : Perform CodeQL Analysis
71
- uses : github/codeql-action/analyze@v1
71
+ uses : github/codeql-action/analyze@v3
Original file line number Diff line number Diff line change
1
+ # When a pull request is opened/reopened or when the head branch of the pull request is updated.
1
2
on :
2
- push :
3
- branches :
4
- - master
3
+ [pull_request]
5
4
6
5
name : Package
7
6
8
7
jobs :
9
8
check :
10
9
name : Package distribution file
11
- runs-on : ubuntu-22.04
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ contents : write
12
13
steps :
13
- - name : Checkout
14
- uses : actions/checkout@v4
15
- with :
16
- ref : master
17
- - name : Node setup
18
- uses : actions/setup-node@v4
19
- with :
20
- node-version : 20
21
- - name : Package
22
- run : |
23
- npm ci
24
- npm test
25
- npm run package
26
- - name : Commit
27
- run : |
28
- git config --global user.name "GitHub Actions"
29
- git add dist/
30
- git commit -m "chore: Update dist" || echo "No changes to commit"
31
- git push origin HEAD:master
14
+ - name : Init a git repo
15
+ uses : actions/checkout@v4
16
+ - name : Checkout PR
17
+ env :
18
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
+ run : gh pr checkout ${{ github.event.pull_request.number }}
20
+ - name : Node setup
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version : 20
24
+ - name : Package
25
+ run : |
26
+ npm ci
27
+ npm test
28
+ npm run package
29
+ - name : Commit to PR
30
+ if : github.actor == 'dependabot[bot]'
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ run : |
34
+ git config --global user.name "GitHub Actions"
35
+ git add dist/
36
+ git commit -m "chore: Update dist" || echo "No changes to commit"
37
+ git push
38
+ - name : Check git diff
39
+ if : github.actor != 'dependabot[bot]'
40
+ run : |
41
+ git diff --exit-code dist/index.js
You can’t perform that action at this time.
0 commit comments