File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-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+ tags : [ "*" ]
6+ release :
7+ types : [ published ]
8+
9+ jobs :
10+ build-and-push :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Set up docker buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Login to Docker Hub
24+ uses : docker/login-action@v3
25+ with :
26+ username : ${{ secrets.DOCKER_USERNAME }}
27+ password : ${{ secrets.DOCKER_PASSWORD }}
28+
29+ - name : Extract Docker metadata
30+ id : meta
31+ uses : docker/metadata-action@v5
32+ with :
33+ images : jankaritech/web-app-presentation-viewer
34+ tags : |
35+ type=semver,pattern={{version}}
36+ type=semver,pattern={{major}}.{{minor}}
37+ type=semver,pattern={{major}}
38+ type=raw,value=latest,enable={{is_default_branch}}
39+
40+ - name : Build and push Docker Image
41+ uses : docker/build-push-action@v6
42+ with :
43+ context : .
44+ push : true
45+ tags : ${{ steps.meta.outputs.tags }}
46+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments