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 : Release
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-and-push :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Set up QEMU
23+ uses : docker/setup-qemu-action@v3
24+
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@v3
27+
28+ - name : Log in to Container Registry
29+ uses : docker/login-action@v3
30+ with :
31+ registry : ${{ env.REGISTRY }}
32+ username : ${{ github.actor }}
33+ password : ${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Extract metadata (tags, labels) for Docker
36+ id : meta
37+ uses : docker/metadata-action@v5
38+ with :
39+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+ tags : |
41+ type=semver,pattern={{version}}
42+ type=semver,pattern={{major}}.{{minor}}
43+ type=semver,pattern={{major}}
44+ type=raw,value=latest
45+
46+ - name : Build and push Docker image
47+ uses : docker/build-push-action@v6
48+ with :
49+ context : .
50+ platforms : linux/amd64,linux/arm64
51+ push : true
52+ tags : ${{ steps.meta.outputs.tags }}
53+ labels : ${{ steps.meta.outputs.labels }}
54+ cache-from : type=gha
55+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments