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