File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Push Multi-Arch Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' v*.*.*'
9+
10+ jobs :
11+ build-and-push :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout Repository
16+ uses : actions/checkout@v3
17+
18+ - name : Set up QEMU
19+ uses : docker/setup-qemu-action@v2
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v2
22+
23+ - name : Log in to Docker Hub
24+ uses : docker/login-action@v2
25+ with :
26+ username : ${{ secrets.DOCKERHUB_USERNAME }}
27+ password : ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+ - name : Extract Docker Image Metadata
30+ id : meta
31+ uses : docker/metadata-action@v4
32+ with :
33+ images : ${{ secrets.DOCKERHUB_USERNAME }}/checkin
34+ tags : |
35+ type=ref,event=branch,match=main->[latest]
36+ type=semver,pattern=v*.*.*->[{{version}}],[latest]
37+ labels : |
38+ org.opencontainers.image.source=${{ github.repository }}
39+
40+ - name : Build and Push Docker Image
41+ uses : docker/build-push-action@v4
42+ with :
43+ context : .
44+ file : ./Dockerfile
45+ push : true
46+ platforms : linux/amd64,linux/arm64,linux/arm/v7
47+ tags : ${{ steps.meta.outputs.tags }}
48+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments