@@ -21,7 +21,6 @@ defaults:
21
21
22
22
env :
23
23
AWS_DEFAULT_REGION : us-east-1
24
- CURL_CACHE_DIR : ~/.cache/curl
25
24
PIP_CACHE_DIR : ~/.cache/pip
26
25
PRE_COMMIT_CACHE_DIR : ~/.cache/pre-commit
27
26
RUN_TMATE : ${{ secrets.RUN_TMATE }}
32
31
jobs :
33
32
diagnostics :
34
33
name : Run diagnostics
34
+ # This job does not need any permissions
35
+ permissions : {}
35
36
runs-on : ubuntu-latest
36
37
steps :
37
38
# Note that a duplicate of this step must be added at the top of
38
39
# each job.
40
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
41
+ with :
42
+ # Uses the organization variable unless overridden
43
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
44
+ # Note that a duplicate of this step must be added at the top of
45
+ # each job.
39
46
- id : harden-runner
40
47
name : Harden the runner
41
48
uses : step-security/harden-runner@v2
50
57
lint :
51
58
needs :
52
59
- diagnostics
60
+ permissions :
61
+ # actions/checkout needs this to fetch code
62
+ contents : read
53
63
runs-on : ubuntu-latest
54
64
steps :
65
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
66
+ with :
67
+ # Uses the organization variable unless overridden
68
+ config : ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
55
69
- id : harden-runner
56
70
name : Harden the runner
57
71
uses : step-security/harden-runner@v2
77
91
name : Lookup Go cache directory
78
92
run : |
79
93
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
80
- - uses : actions/cache@v3
94
+ - uses : actions/cache@v4
81
95
env :
82
96
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
83
97
py${{ steps.setup-python.outputs.python-version }}-\
@@ -98,25 +112,12 @@ jobs:
98
112
path : |
99
113
${{ env.PIP_CACHE_DIR }}
100
114
${{ env.PRE_COMMIT_CACHE_DIR }}
101
- ${{ env.CURL_CACHE_DIR }}
102
115
${{ steps.go-cache.outputs.dir }}
103
116
restore-keys : |
104
117
${{ env.BASE_CACHE_KEY }}
105
- - name : Setup curl cache
106
- run : mkdir -p ${{ env.CURL_CACHE_DIR }}
107
- - name : Install Packer
108
- env :
109
- PACKER_VERSION : ${{ steps.setup-env.outputs.packer-version }}
110
- run : |
111
- PACKER_ZIP="packer_${PACKER_VERSION}_linux_amd64.zip"
112
- curl --output ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
113
- --time-cond ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}" \
114
- --location \
115
- "https://releases.hashicorp.com/packer/${PACKER_VERSION}/${PACKER_ZIP}"
116
- sudo unzip -d /opt/packer \
117
- ${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
118
- sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
119
- sudo ln -s /opt/packer/packer /usr/local/bin/packer
118
+ - uses : hashicorp/setup-packer@v3
119
+ with :
120
+ version : ${{ steps.setup-env.outputs.packer-version }}
120
121
- uses : hashicorp/setup-terraform@v3
121
122
with :
122
123
terraform_version : ${{ steps.setup-env.outputs.terraform-version }}
@@ -174,6 +175,9 @@ jobs:
174
175
${{ matrix.platform }}-${{ matrix.architecture }}
175
176
needs :
176
177
- diagnostics
178
+ permissions :
179
+ # actions/checkout needs this to fetch code
180
+ contents : read
177
181
runs-on : ubuntu-latest
178
182
strategy :
179
183
fail-fast : false
@@ -192,13 +196,21 @@ jobs:
192
196
# - debian13-systemd
193
197
# - fedora39-systemd
194
198
# - fedora40-systemd
199
+ # - fedora41-systemd
195
200
# - kali-systemd
196
201
# - ubuntu-20-systemd
197
202
# - ubuntu-22-systemd
198
203
# - ubuntu-24-systemd
199
204
scenario :
200
205
- default
201
206
steps :
207
+ # With this task in place the GitHub runners run out of
208
+ # resources and crash. See cisagov/skeleton-ansible-role#211
209
+ # for more details.
210
+ # - uses: GitHubSecurityLab/actions-permissions/monitor@v1
211
+ # with:
212
+ # # Uses the organization variable unless overridden
213
+ # config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
202
214
- id : harden-runner
203
215
name : Harden the runner
204
216
uses : step-security/harden-runner@v2
@@ -211,7 +223,7 @@ jobs:
211
223
uses : actions/setup-python@v5
212
224
with :
213
225
python-version : ${{ steps.setup-env.outputs.python-version }}
214
- - uses : actions/cache@v3
226
+ - uses : actions/cache@v4
215
227
env :
216
228
BASE_CACHE_KEY : " ${{ github.job }}-${{ runner.os }}-\
217
229
py${{ steps.setup-python.outputs.python-version }}-"
0 commit comments