Skip to content

Commit 9b43f68

Browse files
committed
Harden rollup-node image publishing workflow
1 parent aa13d47 commit 9b43f68

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
steps:
4343
- name: Checkout repository
4444
uses: actions/checkout@v4
45+
with:
46+
persist-credentials: false
4547

4648
- name: Extract version from Cargo.toml
4749
run: |
@@ -82,7 +84,6 @@ jobs:
8284
TAGS="${TAGS},${IMAGE_NAME}:${VERSION_MAJOR}.${VERSION_MINOR}"
8385
TAGS="${TAGS},${IMAGE_NAME}:${VERSION_MAJOR}"
8486
TAGS="${TAGS},${IMAGE_NAME}:latest-testnet"
85-
TAGS="${TAGS},${IMAGE_NAME}:latest-devnet"
8687
fi
8788
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
8889
ENVIRONMENT="testnet"
@@ -116,21 +117,23 @@ jobs:
116117
117118
- name: Set up QEMU
118119
if: ${{ github.ref_type == 'tag' || (github.event_name == 'workflow_dispatch' && github.event.inputs.build_arm64 == 'true') }}
119-
uses: docker/setup-qemu-action@v3
120+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
120121

121122
- name: Set up Docker Buildx
122-
uses: docker/setup-buildx-action@v3
123+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
124+
with:
125+
cache-binary: false
123126

124127
- name: Login to Docker Hub
125128
if: ${{ github.event_name != 'pull_request' }}
126-
uses: docker/login-action@v3
129+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
127130
with:
128131
username: ${{ secrets.DOCKERHUB_USERNAME }}
129132
password: ${{ secrets.DOCKERHUB_TOKEN }}
130133

131134
- name: Build Docker image
132135
if: ${{ github.event_name == 'pull_request' }}
133-
uses: docker/build-push-action@v5
136+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
134137
with:
135138
context: .
136139
file: Dockerfile
@@ -153,7 +156,7 @@ jobs:
153156
154157
- name: Build and push Docker image
155158
if: ${{ github.event_name != 'pull_request' }}
156-
uses: docker/build-push-action@v5
159+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
157160
with:
158161
context: .
159162
file: Dockerfile

0 commit comments

Comments
 (0)