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