Skip to content

Commit 1717a8b

Browse files
Pin GitHub Actions to a commit hash (#456)
Enable dependabot for GitHub Actions to keep versions up-to-date. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent 96d934e commit 1717a8b

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: daily

.github/workflows/release.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
runs-on: ubuntu-24.04
2121
needs: test
2222
steps:
23-
- uses: actions/setup-node@v4
23+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2424
with:
2525
node-version: "18.x"
2626
registry-url: "https://registry.npmjs.org"
27-
- uses: actions/download-artifact@v4
27+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
2828
with:
2929
name: node-tgzs
3030
path: build/
@@ -52,26 +52,26 @@ jobs:
5252
- platform: linux-arm64
5353
runner: ubuntu-24.04-arm
5454
steps:
55-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5656
- name: Get commit timestamp
5757
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "${GITHUB_ENV}"
5858
- name: Login to GitHub Container Registry
59-
uses: docker/login-action@v3
59+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
6060
with:
6161
registry: ghcr.io
6262
username: ${{ github.actor }}
6363
password: ${{ secrets.GITHUB_TOKEN }}
6464
- name: Login to Docker Hub
65-
uses: docker/login-action@v3
65+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
6666
with:
6767
registry: docker.io
6868
username: ${{ secrets.DOCKERHUB_USERNAME }}
6969
password: ${{ secrets.DOCKERHUB_TOKEN }}
7070
- name: Set up Docker Buildx
71-
uses: docker/setup-buildx-action@v3
71+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
7272
- name: Build image
7373
id: build
74-
uses: docker/build-push-action@v6
74+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
7575
with:
7676
file: docker/fabric-nodeenv/Dockerfile
7777
context: docker/fabric-nodeenv
@@ -84,7 +84,7 @@ jobs:
8484
digest="${{ steps.build.outputs.digest }}"
8585
touch "${{ runner.temp }}/digests/${digest#sha256:}"
8686
- name: Upload digest
87-
uses: actions/upload-artifact@v4
87+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8888
with:
8989
name: digest-${{ matrix.arch.platform }}
9090
path: ${{ runner.temp }}/digests/*
@@ -105,28 +105,28 @@ jobs:
105105
- ghcr.io
106106
steps:
107107
- name: Download digests
108-
uses: actions/download-artifact@v4
108+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
109109
with:
110110
path: ${{ runner.temp }}/digests
111111
pattern: digest-*
112112
merge-multiple: true
113113
- name: Login to ${{ matrix.registry }}
114-
uses: docker/login-action@v3
114+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
115115
with:
116116
registry: ${{ matrix.registry }}
117117
username: ${{ matrix.registry == 'docker.io' && secrets.DOCKERHUB_USERNAME || github.actor }}
118118
password: ${{ matrix.registry == 'docker.io' && secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }}
119119
- name: Docker metadata
120120
id: meta
121-
uses: docker/metadata-action@v5
121+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
122122
with:
123123
images: ${{ matrix.registry }}/${{ env.IMAGE_NAME }}
124124
tags: |
125125
type=semver,pattern={{version}}
126126
type=semver,pattern={{major}}.{{minor}}
127127
type=semver,pattern={{major}}.{{minor}}.{{patch}}
128128
- name: Set up Docker Buildx
129-
uses: docker/setup-buildx-action@v3
129+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
130130
- name: Create and push manifest list
131131
working-directory: ${{ runner.temp }}/digests
132132
run: |

.github/workflows/scan.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
scan:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
with:
2525
ref: ${{ inputs.ref }}
26-
- uses: actions/setup-node@v4
26+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2727
with:
2828
node-version: 18
2929
- name: Install

.github/workflows/test.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
MINOR_PACKAGE_VERSION: ${{ steps.builddata.outputs.MINOR_PACKAGE_VERSION }}
1515
BUILD_DATE: ${{ steps.builddata.outputs.BUILD_DATE }}
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
- name: BuildData
1919
id: builddata
2020
run: |
@@ -39,8 +39,8 @@ jobs:
3939
build:
4040
runs-on: ubuntu-24.04
4141
steps:
42-
- uses: actions/checkout@v4
43-
- uses: actions/setup-node@v4
42+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4444
with:
4545
node-version: "18.x"
4646
- name: Install/Rebuild/UnitTest
@@ -51,7 +51,7 @@ jobs:
5151
- name: Pre-process Artifacts
5252
run: |
5353
npx cobertura-merge -o merged_coverage.xml shim=./libraries/fabric-shim/coverage/cobertura-coverage.xml contractapi=./apis/fabric-contract-api/coverage/cobertura-coverage.xml -p
54-
- uses: actions/upload-artifact@v4
54+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5555
name: Upload test results
5656
if: ${{ !cancelled() }}
5757
with:
@@ -62,12 +62,12 @@ jobs:
6262
set -xev
6363
node common/scripts/install-run-rush.js publish --include-all --pack --release-folder tgz --publish
6464
docker image save hyperledger/fabric-nodeenv | gzip > fabric-nodeenv.tar.gz
65-
- uses: actions/upload-artifact@v4
65+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6666
name: Binaries
6767
with:
6868
name: node-tgzs
6969
path: tgz/
70-
- uses: actions/upload-artifact@v4
70+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7171
name: Docker
7272
with:
7373
name: nodeenv-docker-image
@@ -77,15 +77,15 @@ jobs:
7777
runs-on: ubuntu-24.04
7878
needs: build
7979
steps:
80-
- uses: actions/checkout@v4
81-
- uses: actions/setup-node@v4
80+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
81+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
8282
with:
8383
node-version: "18.x"
84-
- uses: actions/download-artifact@v4
84+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
8585
with:
8686
name: nodeenv-docker-image
8787
path: build/
88-
- uses: actions/download-artifact@v4
88+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
8989
with:
9090
name: node-tgzs
9191
path: build/
@@ -110,7 +110,7 @@ jobs:
110110
111111
node common/scripts/install-run-rush.js test:fv --verbose
112112
node common/scripts/install-run-rush.js test:e2e --verbose
113-
- uses: actions/upload-artifact@v4
113+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
114114
if: ${{ !cancelled() }}
115115
name: TestLogs
116116
with:

0 commit comments

Comments
 (0)