Skip to content

Commit f97499b

Browse files
vdemeesterchmouel
authored andcommitted
ci: Pin GitHub Actions to commit SHAs
- Improve supply chain security by using immutable refs - Ease transfer of workflows to tektoncd organization Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent 59a480c commit f97499b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/container.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626

2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v6
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3030

3131
- name: Set up Go
32-
uses: actions/setup-go@v6
32+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
3333
with:
3434
go-version-file: "go.mod"
3535

36-
- uses: ko-build/setup-ko@v0.9
36+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
3737

3838
- name: Build and push images
3939
shell: bash

.github/workflows/e2e.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ jobs:
8989
TEST_GITLAB_PROJECT_ID: ${{ vars.TEST_GITLAB_PROJECT_ID }}
9090
TEST_GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
9191
steps:
92-
- uses: actions/checkout@v6
92+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
9393
with:
9494
ref: ${{ inputs.target_ref || github.event.pull_request.head.sha || github.sha }}
9595

9696
# Step to check PR author's org membership and repo permissions.
9797
# This step will fail the job if checks do not pass, skipping subsequent steps.
9898
- name: Check user permissions on PRs
9999
if: github.event_name == 'pull_request_target'
100-
uses: actions/github-script@v8
100+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
101101
with:
102102
script: |
103103
if (!context || !context.payload || !context.payload.pull_request) {
@@ -258,19 +258,19 @@ jobs:
258258
core.setFailed(`Unexpected error during permission check: ${err.message}`);
259259
});
260260
261-
- uses: actions/setup-go@v6
261+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
262262
with:
263263
go-version-file: "go.mod"
264264

265265
- name: Cache ko layer cache
266-
uses: actions/cache@v5
266+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
267267
with:
268268
path: /tmp/ko-cache
269269
key: ${{ runner.os }}-ko-${{ hashFiles('go.sum') }}
270270
restore-keys: |
271271
${{ runner.os }}-ko-
272272
273-
- uses: ko-build/setup-ko@v0.9
273+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
274274

275275
# Start binary build in background as soon as possible so we can optimize
276276
# the run of e2e when it's start later on
@@ -280,12 +280,12 @@ jobs:
280280
echo $! > /tmp/binary-build.pid
281281
282282
- name: Install gosmee
283-
uses: jaxxstorm/action-install-gh-release@v2.1.0
283+
uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0
284284
with:
285285
repo: chmouel/gosmee
286286

287287
- name: Install Snazy
288-
uses: jaxxstorm/action-install-gh-release@v2.1.0
288+
uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0
289289
with:
290290
repo: chmouel/snazy
291291

@@ -303,7 +303,7 @@ jobs:
303303
echo "TEST_GITEA_SMEEURL=${SMEE_URL}" >> "$GITHUB_ENV"
304304
305305
- name: Setup tmate session
306-
uses: mxschmitt/action-tmate@v3
306+
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3
307307
# add all environment so we can debug easily
308308
env:
309309
CONTROLLER_DOMAIN_URL: controller.paac-127-0-0-1.nip.io
@@ -433,7 +433,7 @@ jobs:
433433
434434
- name: Upload artifacts
435435
if: ${{ always() }}
436-
uses: actions/upload-artifact@v6
436+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
437437
with:
438438
name: logs-e2e-tests-${{ matrix.provider }}
439439
path: /tmp/logs
@@ -444,9 +444,9 @@ jobs:
444444
needs: [e2e-tests]
445445
if: ${{ always() && github.ref_name == 'main' && github.event_name == 'schedule' }}
446446
steps:
447-
- uses: actions/checkout@v6
447+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
448448
- name: Download all artifacts
449-
uses: actions/download-artifact@v7
449+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
450450
with:
451451
path: artifacts
452452
pattern: logs-e2e-tests-*

0 commit comments

Comments
 (0)