File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : docker
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - ' main'
8+ tags :
9+ - ' v*'
10+ paths :
11+ - " .github/workflows/docker.yml"
12+ - " Dockerfile"
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ timeout-minutes : 200
18+
19+ steps :
20+ -
21+ name : Checkout
22+ uses : actions/checkout@v4
23+ -
24+ name : Set up QEMU
25+ uses : docker/setup-qemu-action@v3
26+ -
27+ name : Login to Docker Hub
28+ uses : docker/login-action@v3
29+ with :
30+ username : ${{ secrets.DOCKER_USERNAME }}
31+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
32+ -
33+ name : Docker meta
34+ id : meta
35+ uses : docker/metadata-action@v5
36+ with :
37+ images : ${{ secrets.DOCKER_USERNAME }}/alpine_git_wget
38+ tags : |
39+ type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
40+ type=semver,pattern={{version}}
41+ -
42+ name : Set up Docker Buildx
43+ uses : docker/setup-buildx-action@v3
44+ -
45+ name : Build and push
46+ uses : docker/build-push-action@v6
47+ with :
48+ context : .
49+ shm-size : 2g
50+ file : ./Dockerfile
51+ platforms : linux/amd64,linux/arm64
52+ push : true
53+ tags : ${{ env.DOCKER_METADATA_OUTPUT_TAGS }}
You can’t perform that action at this time.
0 commit comments