@@ -20,7 +20,6 @@ defaults:
20
20
shell : bash -Eueo pipefail -x {0}
21
21
22
22
env :
23
- CURL_CACHE_DIR : ~/.cache/curl
24
23
PIP_CACHE_DIR : ~/.cache/pip
25
24
PRE_COMMIT_CACHE_DIR : ~/.cache/pre-commit
26
25
RUN_TMATE : ${{ secrets.RUN_TMATE }}
31
30
jobs :
32
31
diagnostics :
33
32
name : Run diagnostics
33
+ # This job does not need any permissions
34
+ permissions : {}
34
35
runs-on : ubuntu-latest
35
36
steps :
36
37
# Note that a duplicate of this step must be added at the top of
37
38
# each job.
39
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
40
+ with :
41
+ # Uses the organization variable unless overridden
42
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
43
+ # Note that a duplicate of this step must be added at the top of
44
+ # each job.
38
45
- id : harden-runner
39
46
name : Harden the runner
40
47
uses : step-security/harden-runner@v2
49
56
lint :
50
57
needs :
51
58
- diagnostics
59
+ permissions :
60
+ # actions/checkout needs this to fetch code
61
+ contents : read
52
62
runs-on : ubuntu-latest
53
63
steps :
64
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
65
+ with :
66
+ # Uses the organization variable unless overridden
67
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
54
68
- id : harden-runner
55
69
name : Harden the runner
56
70
uses : step-security/harden-runner@v2
78
92
name : Lookup Go cache directory
79
93
run : |
80
94
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
81
- - uses : actions/cache@v3
95
+ - uses : actions/cache@v4
82
96
env :
83
97
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
84
98
py${{ steps.setup-python.outputs.python-version }}-\
@@ -103,25 +117,12 @@ jobs:
103
117
path : |
104
118
${{ env.PIP_CACHE_DIR }}
105
119
${{ env.PRE_COMMIT_CACHE_DIR }}
106
- ${{ env.CURL_CACHE_DIR }}
107
120
${{ steps.go-cache.outputs.dir }}
108
121
restore-keys : |
109
122
${{ env.BASE_CACHE_KEY }}
110
- - name : Setup curl cache
111
- run : mkdir -p ${{ env.CURL_CACHE_DIR }}
112
- - name : Install Packer
113
- env :
114
- PACKER_VERSION : ${{ steps.setup-env.outputs.packer-version }}
115
- run : |
116
- PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
117
- curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
118
- --time-cond ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
119
- --location \
120
- "https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
121
- sudo unzip -d /opt/packer \
122
- ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
123
- sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
124
- sudo ln -s /opt/packer/packer /usr/local/bin/packer
123
+ - uses : hashicorp/setup-packer@v3
124
+ with :
125
+ version : ${{ steps.setup-env.outputs.packer-version }}
125
126
- uses : hashicorp/setup-terraform@v3
126
127
with :
127
128
terraform_version : ${{ steps.setup-env.outputs.terraform-version }}
@@ -177,18 +178,29 @@ jobs:
177
178
name : test source - py${{ matrix.python-version }}
178
179
needs :
179
180
- diagnostics
181
+ permissions :
182
+ # actions/checkout needs this to fetch code
183
+ contents : read
180
184
runs-on : ubuntu-latest
181
185
strategy :
182
186
fail-fast : false
183
187
matrix :
184
188
python-version :
185
- - " 3.7"
186
- - " 3.8"
187
189
- " 3.9"
188
190
- " 3.10"
191
+ <<<<<<< HEAD
189
192
# - "3.11"
190
193
# - "3.12"
194
+ =======
195
+ - " 3.11"
196
+ - " 3.12"
197
+ - " 3.13"
198
+ >>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
191
199
steps :
200
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
201
+ with :
202
+ # Uses the organization variable unless overridden
203
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
192
204
- id : harden-runner
193
205
name : Harden the runner
194
206
uses : step-security/harden-runner@v2
@@ -199,7 +211,7 @@ jobs:
199
211
uses : actions/setup-python@v5
200
212
with :
201
213
python-version : ${{ matrix.python-version }}
202
- - uses : actions/cache@v3
214
+ - uses : actions/cache@v4
203
215
env :
204
216
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
205
217
py${{ steps.setup-python.outputs.python-version }}-"
@@ -234,11 +246,18 @@ jobs:
234
246
uses : mxschmitt/action-tmate@v3
235
247
if : env.RUN_TMATE
236
248
coveralls-finish :
249
+ permissions :
250
+ # actions/checkout needs this to fetch code
251
+ contents : read
237
252
runs-on : ubuntu-latest
238
253
needs :
239
254
- diagnostics
240
255
- test
241
256
steps :
257
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
258
+ with :
259
+ # Uses the organization variable unless overridden
260
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
242
261
- id : harden-runner
243
262
name : Harden the runner
244
263
uses : step-security/harden-runner@v2
@@ -250,10 +269,15 @@ jobs:
250
269
- id : setup-python
251
270
uses : actions/setup-python@v5
252
271
with :
272
+ <<<<<<< HEAD
253
273
# python-version: ${{ steps.setup-env.outputs.python-version }}
254
274
# This project cannot currently support Python 3.11 or 3.12.
255
275
python-version : " 3.10"
256
276
- uses : actions/cache@v3
277
+ =======
278
+ python-version : ${{ steps.setup-env.outputs.python-version }}
279
+ - uses : actions/cache@v4
280
+ >>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
257
281
env :
258
282
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
259
283
py${{ steps.setup-python.outputs.python-version }}-"
@@ -285,18 +309,29 @@ jobs:
285
309
- diagnostics
286
310
- lint
287
311
- test
312
+ permissions :
313
+ # actions/checkout needs this to fetch code
314
+ contents : read
288
315
runs-on : ubuntu-latest
289
316
strategy :
290
317
fail-fast : false
291
318
matrix :
292
319
python-version :
293
- - " 3.7"
294
- - " 3.8"
295
320
- " 3.9"
296
321
- " 3.10"
322
+ <<<<<<< HEAD
297
323
# - "3.11"
298
324
# - "3.12"
325
+ =======
326
+ - " 3.11"
327
+ - " 3.12"
328
+ - " 3.13"
329
+ >>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
299
330
steps :
331
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
332
+ with :
333
+ # Uses the organization variable unless overridden
334
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
300
335
- id : harden-runner
301
336
name : Harden the runner
302
337
uses : step-security/harden-runner@v2
@@ -307,7 +342,7 @@ jobs:
307
342
uses : actions/setup-python@v5
308
343
with :
309
344
python-version : ${{ matrix.python-version }}
310
- - uses : actions/cache@v3
345
+ - uses : actions/cache@v4
311
346
env :
312
347
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
313
348
py${{ steps.setup-python.outputs.python-version }}-"
@@ -340,18 +375,29 @@ jobs:
340
375
needs :
341
376
- diagnostics
342
377
- build
378
+ permissions :
379
+ # actions/checkout needs this to fetch code
380
+ contents : read
343
381
runs-on : ubuntu-latest
344
382
strategy :
345
383
fail-fast : false
346
384
matrix :
347
385
python-version :
348
- - " 3.7"
349
- - " 3.8"
350
386
- " 3.9"
351
387
- " 3.10"
388
+ <<<<<<< HEAD
352
389
# - "3.11"
353
390
# - "3.12"
391
+ =======
392
+ - " 3.11"
393
+ - " 3.12"
394
+ - " 3.13"
395
+ >>>>>>> 0da26c3a45b9a9c2a7d41ed2687b177a6f597116
354
396
steps :
397
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
398
+ with :
399
+ # Uses the organization variable unless overridden
400
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
355
401
- id : harden-runner
356
402
name : Harden the runner
357
403
uses : step-security/harden-runner@v2
@@ -362,7 +408,7 @@ jobs:
362
408
uses : actions/setup-python@v5
363
409
with :
364
410
python-version : ${{ matrix.python-version }}
365
- - uses : actions/cache@v3
411
+ - uses : actions/cache@v4
366
412
env :
367
413
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
368
414
py${{ steps.setup-python.outputs.python-version }}-"
0 commit comments