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 : Publish image
2+
3+ on :
4+ push :
5+ branches : [eurosky]
6+ tags : ["v*"]
7+ pull_request :
8+ branches : [eurosky]
9+ workflow_dispatch :
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ env :
16+ REGISTRY : ghcr.io
17+ IMAGE_NAME : ${{ github.repository }}
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ permissions :
23+ contents : read
24+ packages : write
25+ steps :
26+ - uses : actions/checkout@v7
27+
28+ - uses : docker/setup-buildx-action@v4
29+
30+ - uses : docker/login-action@v4
31+ if : github.event_name != 'pull_request'
32+ with :
33+ registry : ${{ env.REGISTRY }}
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - id : meta
38+ uses : docker/metadata-action@v6
39+ with :
40+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
41+ tags : |
42+ # latest tracks the eurosky branch
43+ type=raw,value=latest,enable=${{ github.ref == 'refs/heads/eurosky' }}
44+ type=ref,event=branch
45+ type=ref,event=pr
46+ type=semver,pattern={{version}}
47+ type=semver,pattern={{major}}.{{minor}}
48+ type=sha,format=long
49+
50+ - uses : docker/build-push-action@v7
51+ with :
52+ context : .
53+ push : ${{ github.event_name != 'pull_request' }}
54+ tags : ${{ steps.meta.outputs.tags }}
55+ labels : ${{ steps.meta.outputs.labels }}
56+ cache-from : type=gha
57+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments