File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and push Image
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ env :
9+ REGISTRY : ghcr.io
10+ IMAGE_NAME : ${{ github.repository }}
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ - name : Log in to the Container registry
19+ uses : docker/login-action@v3
20+ with :
21+ registry : ${{ env.REGISTRY }}
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+ - name : Extract metadata (tags, labels)
25+ uses : docker/metadata-action@v5
26+ id : meta
27+ with :
28+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
29+ tags : |
30+ type=semver,pattern={{version}}
31+ type=sha
32+ # set latest tag for default branch
33+ type=raw,value=latest,enable={{is_default_branch}}
34+ - name : Build and push image
35+ uses : docker/build-push-action@v6
36+ with :
37+ context : .
38+ push : true
39+ tags : ${{ steps.meta.outputs.tags }}
40+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments