12
12
steps :
13
13
- name : Lookup default branch name
14
14
id : lookup_default_branch
15
- uses : actions/github-script@v6
15
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
16
16
with :
17
17
github-token : ${{ secrets.GITHUB_TOKEN }}
18
+ retries : 6 # final retry should wait 64 seconds
19
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
18
20
result-encoding : string
19
21
script : |
20
22
const repo = await github.rest.repos.get({
28
30
29
31
- name : Lookup HEAD commit on default branch
30
32
id : lookup_default_branch_head
31
- uses : actions/github-script@v6
33
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
32
34
with :
33
35
github-token : ${{ secrets.GITHUB_TOKEN }}
36
+ retries : 6 # final retry should wait 64 seconds
37
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
34
38
result-encoding : string
35
39
script : |
36
40
const branch = await github.rest.repos.getBranch({
50
54
steps :
51
55
- name : Check for 'no_release' label on PR
52
56
id : check_for_norelease_label
53
- uses : actions/github-script@v6
57
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
54
58
with :
55
59
github-token : ${{ secrets.GITHUB_TOKEN }}
60
+ retries : 6 # final retry should wait 64 seconds
61
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
56
62
script : |
57
63
const labels = await github.rest.issues.listLabelsOnIssue({
58
64
owner: context.payload.repository.owner.login,
91
97
steps :
92
98
- name : Get Open PRs
93
99
id : get_open_pr_list
94
- uses : actions/github-script@v6
100
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
95
101
with :
96
102
github-token : ${{ secrets.GITHUB_TOKEN }}
103
+ retries : 6 # final retry should wait 64 seconds
104
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
97
105
# find all open PRs that are targetting the default branch (i.e. main/master)
98
106
# return their titles, so they can parsed later to determine if they are
99
107
# Dependabot PRs and whether we should wait for them to be auto-merged before
@@ -115,9 +123,11 @@ jobs:
115
123
116
124
- name : Get 'pending_release' PRs
117
125
id : get_release_pending_pr_list
118
- uses : actions/github-script@v6
126
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
119
127
with :
120
128
github-token : ${{ secrets.GITHUB_TOKEN }}
129
+ retries : 6 # final retry should wait 64 seconds
130
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
121
131
script : |
122
132
const repoWithOwner = `${context.payload.repository.owner.login}/${context.payload.repository.name}`;
123
133
const pulls = await github.rest.search.issuesAndPullRequests({
@@ -148,7 +158,7 @@ jobs:
148
158
EOF
149
159
echo "is_release_pending : ${{ steps.get_release_pending_pr_list.outputs.is_release_pending }}"
150
160
151
- - uses : actions/checkout@v3
161
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
152
162
- name : Read pr-autoflow configuration
153
163
id : get_pr_autoflow_config
154
164
uses : endjin/pr-autoflow/actions/read-configuration@v4
@@ -157,8 +167,10 @@ jobs:
157
167
158
168
- name : Check Human PR
159
169
id : is_human_pr
160
- uses : actions/github-script@v6
170
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
161
171
with :
172
+ retries : 6 # final retry should wait 64 seconds
173
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
162
174
script : |
163
175
return context.payload.pull_request.user.login != 'dependabot[bot]' && context.payload.pull_request.user.login != 'dependjinbot[bot]'
164
176
@@ -173,8 +185,10 @@ jobs:
173
185
174
186
- name : Set Ready for Release
175
187
id : set_ready_for_release
176
- uses : actions/github-script@v6
188
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
177
189
with :
190
+ retries : 6 # final retry should wait 64 seconds
191
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
178
192
script : |
179
193
return ( '${{ steps.is_human_pr.outputs.result }}' == 'true' || '${{ steps.watch_dependabot_prs.outputs.is_complete }}' == 'True') && '${{ steps.get_release_pending_pr_list.outputs.is_release_pending }}' == 'true'
180
194
@@ -193,11 +207,11 @@ jobs:
193
207
if : |
194
208
needs.check_ready_to_release.outputs.ready_to_release == 'true'
195
209
steps :
196
- - uses : actions/setup-dotnet@v1
210
+ - uses : actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
197
211
with :
198
212
dotnet-version : ' 6.x'
199
213
200
- - uses : actions/checkout@v3
214
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
201
215
with :
202
216
# ensure we are creating the release tag on the default branch
203
217
ref : ${{ needs.lookup_default_branch.outputs.branch_name }}
@@ -214,15 +228,17 @@ jobs:
214
228
215
229
- name : Generate token
216
230
id : generate_token
217
- uses : tibdex/github-app-token@v1
231
+ uses : tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1.9
218
232
with :
219
233
app_id : ${{ secrets.ENDJIN_BOT_APP_ID }}
220
234
private_key : ${{ secrets.ENDJIN_BOT_PRIVATE_KEY }}
221
235
222
236
- name : Create SemVer tag
223
- uses : actions/github-script@v6
237
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
224
238
with :
225
239
github-token : ${{ steps.generate_token.outputs.token }}
240
+ retries : 6 # final retry should wait 64 seconds
241
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
226
242
script : |
227
243
const uri_path = '/repos/' + context.payload.repository.owner.login + '/' + context.payload.repository.name + '/git/refs'
228
244
const tag = await github.request(('POST ' + uri_path), {
@@ -234,9 +250,11 @@ jobs:
234
250
235
251
- name : Remove 'release_pending' label from PRs
236
252
id : remove_pending_release_labels
237
- uses : actions/github-script@v6
253
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
238
254
with :
239
255
github-token : ' ${{ steps.generate_token.outputs.token }}'
256
+ retries : 6 # final retry should wait 64 seconds
257
+ retry-exempt-status-codes : 400,401,404,422 # GH will raise rate limits with 403 & 429 status codes
240
258
script : |
241
259
core.info('PRs to unlabel: ${{ needs.check_ready_to_release.outputs.pending_release_pr_list }}')
242
260
const pr_list = JSON.parse('${{ needs.check_ready_to_release.outputs.pending_release_pr_list }}')
0 commit comments