Skip to content

Commit ebe23e5

Browse files
authored
Merge pull request #2209 from nschonni/harden-ci
ci: pin various actions to SHAs
2 parents 8e848ca + e500e20 commit ebe23e5

8 files changed

+22
-26
lines changed

.github/workflows/automatic-updates.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
pull-requests: write
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616

1717
- name: Run automation script
18-
uses: actions/github-script@v7
18+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1919
id: updt
2020
with:
2121
result-encoding: string
@@ -25,7 +25,7 @@ jobs:
2525
2626
- name: Create update PR
2727
id: cpr
28-
uses: peter-evans/create-pull-request@v7
28+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
2929
with:
3030
token: ${{ secrets.GH_API_TOKEN }}
3131
author: "Node.js GitHub Bot <[email protected]>"

.github/workflows/build-test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626

2727
- name: Calculate file differences
2828
id: diff
29-
uses: tj-actions/changed-files@v45
29+
uses: tj-actions/changed-files@2f7c5bfce28377bc069a65ba478de0a74aa0ca32 # v46.0.1
3030
with:
3131
json: true
3232
escape_json: false
3333

3434
- name: Generate testing matrix
35-
uses: actions/github-script@v7
35+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
3636
id: generator
3737
with:
3838
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -59,17 +59,17 @@ jobs:
5959

6060
steps:
6161
- name: Get short node version
62-
uses: actions/github-script@v7
62+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
6363
id: short-version
6464
with:
6565
result-encoding: string
6666
script: return "${{ matrix.version }}".split('.')[0]
6767

6868
- name: Checkout
69-
uses: actions/checkout@v4
69+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7070

7171
- name: Build image
72-
uses: docker/build-push-action@v6
72+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
7373
with:
7474
push: false
7575
load: true

.github/workflows/doctoc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
name: Doc TOC Check
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
1919
with:
2020
node-version: 'lts/*'
2121
- name: Install doctoc

.github/workflows/eclint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
eclint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
1414
with:
1515
node-version: 'lts/*'
1616
- run: npm i -g eclint

.github/workflows/markdown-link-check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
markdown-link-check:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
1818
with:
1919
node-version: 'lts/*'
2020
- name: Install markdown-link-check

.github/workflows/missing-checksum.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

1818
- name: Count number of Alpine Dockersfiles without CHECKSUM
1919
run: |

.github/workflows/official-pr.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121

2222
steps:
2323
- name: Checkout the docker-node repo
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525
with:
2626
path: docker-node
2727
ref: ${{ github.base_ref }}
2828
fetch-depth: 50
2929

3030
- name: Checkout the official-images repo
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232
with:
3333
path: official-images
3434
repository: docker-library/official-images
@@ -40,7 +40,7 @@ jobs:
4040
4141
- name: Create PR in official-images
4242
id: create-pr
43-
uses: peter-evans/create-pull-request@v7
43+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
4444
with:
4545
token: ${{ secrets.GH_API_TOKEN }}
4646
push-to-fork: nodejs/official-images
@@ -58,13 +58,9 @@ jobs:
5858
echo "Pull Request URL - ${{ steps.create-pr.outputs.pull-request-url }}"
5959
6060
- name: Create PR comment
61-
uses: peter-evans/create-or-update-comment@v4
61+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
6262
if: ${{ steps.create-pr.outputs.pull-request-url != '' }}
6363
with:
6464
issue-number: ${{ github.event.pull_request.number }}
6565
body: |
6666
Created PR on the official-images repo (${{ steps.create-pr.outputs.pull-request-url }}). See https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what if you are wondering when it will be available on the Docker Hub.
67-
68-
- name: Dump context
69-
if: always()
70-
uses: crazy-max/ghaction-dump-context@v2

.github/workflows/shfmt.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
shfmt:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
- run: docker run -v "$(pwd)":/sh -w /sh peterdavehello/shfmt:2.6.3 shfmt -sr -i 2 -l -w -ci .
1717
- run: git diff --color --exit-code
1818

1919
shellcheck:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
- run: shellcheck *.sh

0 commit comments

Comments
 (0)