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 : Docker
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - " v*"
9+ release :
10+ types : [published]
11+ workflow_dispatch :
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v3
25+
26+ - name : Log in to GHCR
27+ uses : docker/login-action@v3
28+ with :
29+ registry : ghcr.io
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Extract metadata
34+ id : meta
35+ uses : docker/metadata-action@v5
36+ with :
37+ images : ghcr.io/${{ github.repository }}
38+ tags : |
39+ type=semver,pattern={{version}}
40+ type=semver,pattern={{major}}.{{minor}}
41+ type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
42+ type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/main' }}
43+
44+ - name : Set up QEMU
45+ uses : docker/setup-qemu-action@v3
46+
47+ - name : Build and push
48+ uses : docker/build-push-action@v6
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 }}
55+ cache-from : type=gha
56+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments