18
18
- " *.md"
19
19
types : [opened, ready_for_review, reopened, synchronize]
20
20
21
- permissions :
22
- contents : read
23
-
24
21
# This allows a subsequently queued workflow run to interrupt previous runs
25
22
concurrency :
26
23
group : " ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
@@ -33,27 +30,31 @@ jobs:
33
30
github.event.pull_request.draft == false &&
34
31
github.event_name == 'pull_request'
35
32
runs-on : ubuntu-latest
33
+ permissions :
34
+ contents : read
36
35
steps :
37
36
- name : Check out repo
38
- uses : actions/checkout@v4
37
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39
38
with :
40
39
persist-credentials : false
41
40
42
41
- name : Dependency review
43
- uses : actions/dependency-review-action@v4
42
+ uses : actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
44
43
45
44
lint :
46
45
name : Lint Code
47
46
if : github.event.pull_request.draft == false
48
47
runs-on : ubuntu-latest
48
+ permissions :
49
+ contents : read
49
50
steps :
50
51
- name : Check out repo
51
- uses : actions/checkout@v4
52
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52
53
with :
53
54
persist-credentials : false
54
55
55
56
- name : Setup Node
56
- uses : actions/setup-node@v4
57
+ uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
57
58
with :
58
59
check-latest : true
59
60
node-version : lts/*
@@ -82,15 +83,17 @@ jobs:
82
83
github.event.pull_request.draft == false &&
83
84
github.actor != 'dependabot[bot]'
84
85
runs-on : ubuntu-latest
86
+ permissions :
87
+ contents : read
85
88
steps :
86
89
- name : Check out repo
87
- uses : actions/checkout@v4
90
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88
91
with :
89
92
fetch-depth : 0
90
93
persist-credentials : false
91
94
92
95
- name : Run Commitlint
93
- uses : wagoid/commitlint-github-action@v6
96
+ uses : wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
94
97
with :
95
98
configFile : ./package.json
96
99
@@ -102,14 +105,16 @@ jobs:
102
105
node-version : [20, 22]
103
106
os : [macos-latest, ubuntu-latest, windows-latest]
104
107
runs-on : ${{ matrix.os }}
108
+ permissions :
109
+ contents : read
105
110
steps :
106
111
- name : Check out repo
107
- uses : actions/checkout@v4
112
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
108
113
with :
109
114
persist-credentials : false
110
115
111
116
- name : Setup Node ${{ matrix.node-version }}
112
- uses : actions/setup-node@v4
117
+ uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
113
118
with :
114
119
node-version : ${{ matrix.node-version }}
115
120
@@ -120,8 +125,8 @@ jobs:
120
125
run : npm run test:unit:coverage
121
126
122
127
- name : Coveralls parallel
123
- if : github.repository == 'Fdawgs/fastify-disablecache '
124
- uses : coverallsapp/github-action@v2
128
+ if : github.repository == 'Fdawgs/fastify-json-to-xml '
129
+ uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
125
130
with :
126
131
github-token : ${{ secrets.GITHUB_TOKEN }}
127
132
parallel : true
@@ -132,37 +137,30 @@ jobs:
132
137
needs : unit-tests
133
138
if : >
134
139
github.event.pull_request.draft == false &&
135
- github.repository == 'Fdawgs/fastify-disablecache '
140
+ github.repository == 'Fdawgs/fastify-json-to-xml '
136
141
runs-on : ubuntu-latest
142
+ permissions :
143
+ contents : read
137
144
steps :
138
145
- name : Coveralls finished
139
- uses : coverallsapp/github-action@v2
146
+ uses : coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
140
147
with :
141
148
github-token : ${{ secrets.GITHUB_TOKEN }}
142
149
parallel-finished : true
143
150
144
- # This job is used to save the PR number in an artifact, for use in the automerge.yml workflow
145
- save-pr-number :
146
- name : Save Dependabot PR Number
151
+ automerge :
152
+ name : Automerge Dependabot PRs
147
153
needs : unit-tests
148
154
if : >
149
155
github.event.pull_request.draft == false &&
150
156
github.event_name == 'pull_request' &&
151
157
github.event.pull_request.user.login == 'dependabot[bot]'
152
158
runs-on : ubuntu-latest
159
+ permissions :
160
+ pull-requests : write
161
+ contents : write
153
162
steps :
154
- - name : Check out repo
155
- uses : actions/checkout@v4
163
+ - uses : fastify/github-action-merge-dependabot@e820d631adb1d8ab16c3b93e5afe713450884a4a # v3.11.1
156
164
with :
157
- persist-credentials : false
158
-
159
- - name : Save PR number
160
- run : |
161
- mkdir -p ./pr
162
- echo ${{ github.event.number }} > ./pr/NR
163
-
164
- - name : Upload PR number in artifact
165
- uses : actions/upload-artifact@v4
166
- with :
167
- name : pr
168
- path : pr/
165
+ github-token : ${{ secrets.GITHUB_TOKEN }}
166
+ merge-method : squash
0 commit comments