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+ - feature/initial-helm-charts
7+ tags :
8+ - ' v*'
9+ workflow_dispatch :
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Login to GitHub Container Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Extract metadata for Docker
33+ id : meta
34+ uses : docker/metadata-action@v5
35+ with :
36+ images : ghcr.io/${{ github.repository }}
37+ tags : |
38+ type=ref,event=branch
39+ type=ref,event=pr
40+ type=semver,pattern={{version}}
41+ type=semver,pattern={{major}}.{{minor}}
42+ type=sha,format=short
43+
44+ - name : Build and push Docker image
45+ uses : docker/build-push-action@v5
46+ with :
47+ context : .
48+ push : true
49+ tags : ${{ steps.meta.outputs.tags }}
50+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments