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 : CI/CD Pipeline
2+
3+ on :
4+ push :
5+ branches : [main]
6+ tags : ["v*"]
7+
8+ permissions :
9+ contents : read
10+ packages : write
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v2
18+ - name : Log in to GHCR
19+ uses : docker/login-action@v3
20+ with :
21+ registry : ghcr.io
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+ - name : Extract metadata for Docker
25+ id : meta
26+ uses : docker/metadata-action@v5
27+ with :
28+ images : ghcr.io/udl-tf/united-api
29+ tags : |
30+ type=ref,event=branch
31+ type=semver,pattern={{version}}
32+ type=semver,pattern={{major}}.{{minor}}
33+ type=sha
34+ type=raw,value=build-${{ github.run_number }}
35+ type=raw,value=latest,enable={{is_default_branch}}
36+ - name : Build and push
37+ uses : docker/build-push-action@v5
38+ with :
39+ file : Dockerfile
40+ context : .
41+ push : true
42+ tags : ${{ steps.meta.outputs.tags }}
43+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments