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 & push :)
2+
3+ permissions :
4+ packages : write
5+
6+ on :
7+ push :
8+ branches : [ main, master, trunk ]
9+ pull_request :
10+ branches : [ main, master, trunk ]
11+
12+ env :
13+ REGISTRY : ghcr.io
14+ IMAGE_NAME : qdentity/uploads-test
15+
16+ jobs :
17+ build-and-push :
18+ runs-on : ubuntu-latest
19+ permissions :
20+ contents : read
21+ packages : write
22+
23+ steps :
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+
27+ - name : Log in to Container Registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ${{ env.REGISTRY }}
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Extract metadata
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+ tags : |
40+ type=ref,event=branch
41+ type=ref,event=pr
42+ type=sha,prefix={{branch}}-
43+ type=raw,value=latest,enable={{is_default_branch}}
44+
45+ - name : Build and push Docker image
46+ uses : docker/build-push-action@v5
47+ with :
48+ context : .
49+ platforms : linux/amd64
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