File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and publish docker image on GitHub
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ workflow_dispatch :
8+ inputs :
9+ parameter :
10+ description : Manual workflow run
11+
12+ env :
13+ REGISTRY : ghcr.io
14+ IMAGE_NAME : ${{ github.repository }}
15+
16+ jobs :
17+ build-and-push :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ packages : write
22+
23+ steps :
24+
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : Set up QEMU
29+ uses : docker/setup-qemu-action@v3
30+
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+
34+ - name : Connect to GHRC
35+ uses : docker/login-action@v2
36+ with :
37+ registry : ${{ env.REGISTRY }}
38+ username : ${{ github.actor }}
39+ password : ${{ secrets.GITHUB_TOKEN }}
40+
41+ - name : Get metadata
42+ id : meta
43+ uses : docker/metadata-action@v4
44+ with :
45+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46+
47+ - name : Build and push image
48+ uses : docker/build-push-action@v3
49+ with :
50+ context : .
51+ platforms : linux/amd64,linux/arm64
52+ push : true
53+ tags : ${{ steps.meta.outputs.tags }}
54+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments