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