Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 7efd9a8

Browse files
authored
Build and publish docker image on release (#370)
1 parent e0100b7 commit 7efd9a8

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
name: Build docker image
1+
name: Build and publish Docker image
22

3-
on: workflow_dispatch
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
68
docker:
79
runs-on: ubuntu-latest
810
steps:
11+
- name: Set release version
12+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
13+
914
- name: Set up QEMU
10-
uses: docker/setup-qemu-action@v2
15+
uses: docker/setup-qemu-action@v3
1116

1217
- name: Set up Docker Buildx
13-
uses: docker/setup-buildx-action@v2
18+
uses: docker/setup-buildx-action@v3
1419

1520
- name: Login to Docker Hub
16-
uses: docker/login-action@v2
21+
uses: docker/login-action@v3
1722
with:
18-
username: ${{ secrets.DOCKERHUB_USERNAME }}
19-
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
username: ${{secrets.DOCKERHUB_USERNAME}}
24+
password: ${{secrets.DOCKERHUB_TOKEN}}
2025

2126
- name: Build and push
22-
uses: docker/build-push-action@v4
27+
uses: docker/build-push-action@v5
2328
with:
2429
platforms: linux/amd64,linux/arm64
2530
push: true
26-
tags: stackupwallet/stackup-bundler:latest
31+
tags: |
32+
stackupwallet/stackup-bundler:latest
33+
stackupwallet/stackup-bundler:${{env.RELEASE_VERSION}}

0 commit comments

Comments
 (0)