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