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 published 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 :
13+ runs-on : ubuntu-latest
14+
15+ # --- Set permissions to ephemeral GITHUB_TOKEN for job actions
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - name : Checkout and download repository to workflow runner
22+ uses : actions/checkout@v4
23+
24+ - name : Set up docker builder
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Login to github container registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ${{ env.REGISTRY }}
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Get metadata from docker image
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
40+ - name : Build and push image to github container registry
41+ uses : docker/build-push-action@v5
42+ with :
43+ context : .
44+ load : true
45+ push : true
46+ tags : ${{ steps.meta.outputs.tags }}
You can’t perform that action at this time.
0 commit comments