File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Release Docker Latest
22on :
33 push :
4- branches :
5- - " release-docker"
64
75jobs :
86 docker :
97 runs-on : ubuntu-latest
8+ permissions :
9+ contents : read
10+ packages : write
1011 steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
1115 - name : Set up QEMU
12- uses : docker/setup-qemu-action@v1
16+ uses : docker/setup-qemu-action@v3
1317
1418 - name : Set up Docker Buildx
15- uses : docker/setup-buildx-action@v1
19+ uses : docker/setup-buildx-action@v3
1620
17- - name : Login to DockerHub
18- uses : docker/login-action@v1
21+ - name : Login to GitHub Container Registry
22+ uses : docker/login-action@v3
1923 with :
20- username : ${{ secrets.DOCKERHUB_USERNAME }}
21- password : ${{ secrets.DOCKERHUB_TOKEN }}
24+ registry : ghcr.io
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Extract metadata
29+ id : meta
30+ uses : docker/metadata-action@v5
31+ with :
32+ images : ghcr.io/${{ github.repository }}
33+ tags : |
34+ type=raw,value=latest
2235
2336 - name : Build and push
2437 id : docker_build
25- uses : docker/build-push-action@v2
38+ uses : docker/build-push-action@v5
2639 with :
40+ context : .
2741 push : true
2842 platforms : linux/amd64,linux/arm64
29- tags : |
30- huacnlee/gobackup:latest
43+ tags : ${{ steps.meta.outputs.tags }}
44+ labels : ${{ steps.meta.outputs.labels }}
3145
3246 - name : Image digest
3347 run : echo ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments