Skip to content

Commit a2809a6

Browse files
committed
Add Docker Release workflow
1 parent 646ab84 commit a2809a6

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up QEMU (for multi-arch support)
17+
uses: docker/setup-qemu-action@v2
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v2
24+
with:
25+
registry: docker.io
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+
- name: Build and push Docker image
30+
uses: docker/build-push-action@v4
31+
with:
32+
context: .
33+
file: Dockerfile
34+
push: true
35+
tags: |
36+
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/aligncount-demo:latest
37+
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/aligncount-demo:${{ github.ref_name }}
38+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)