File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ tags : [ "v*" ]
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ dockerhub :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - uses : docker/setup-buildx-action@v3
20+
21+ - uses : docker/login-action@v3
22+ with :
23+ username : ${{ secrets.DOCKERHUB_USERNAME }}
24+ password : ${{ secrets.DOCKERHUB_TOKEN }}
25+
26+ - id : meta
27+ uses : docker/metadata-action@v5
28+ with :
29+ images : ${{ secrets.DOCKERHUB_USERNAME }}/downpatch-web
30+ tags : |
31+ type=raw,value=latest,enable={{is_default_branch}}
32+ type=ref,event=tag
33+ type=sha,format=short
34+
35+ - uses : docker/build-push-action@v6
36+ with :
37+ context : .
38+ file : ./Dockerfile
39+ push : true
40+ tags : ${{ steps.meta.outputs.tags }}
41+ labels : ${{ steps.meta.outputs.labels }}
42+ cache-from : type=gha
43+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments