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 : Publish to GHCR
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v3
20+
21+ - name : Log in to GHCR
22+ uses : docker/login-action@v3
23+ with :
24+ registry : ghcr.io
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Extract metadata
29+ id : meta
30+ uses : docker/metadata-action@v5
31+ with :
32+ images : ghcr.io/${{ github.repository }}
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : .
38+ push : true
39+ tags : |
40+ ghcr.io/${{ github.repository }}:latest
41+ ${{ steps.meta.outputs.tags }}
42+ cache-from : type=gha
43+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments