File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - Dockerfile
9+ - ' **/*.go'
10+ - ' **/front/**'
11+ workflow_dispatch :
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout Code
19+ uses : actions/checkout@v3
20+
21+ - name : Log in to Docker Hub
22+ uses : docker/login-action@v2
23+ with :
24+ username : ${{ secrets.DOCKERHUB_USERNAME }}
25+ password : ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@v2
29+ with :
30+ platforms : all
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v2
34+
35+ - name : Build and Push Docker Image
36+ uses : docker/build-push-action@v5
37+ with :
38+ context : .
39+ push : true
40+ platforms : |
41+ linux/amd64
42+ linux/arm64
43+ linux/arm/v7
44+ linux/arm/v6
45+ linux/ppc64le
46+ linux/s390x
47+ linux/386
48+ tags : |
49+ hanxi/tiny-nav:latest
50+ hanxi/tiny-nav:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments