File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release images using semantic tag versioning
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+
7+ jobs :
8+ setup-build-deploy :
9+ name : Setup, Build, and Deploy
10+ runs-on : ubuntu-latest
11+ permissions :
12+ packages : write
13+ contents : write
14+ id-token : write
15+
16+ steps :
17+ - name : Bump version and push tag
18+ id : tag_version
19+ uses : mathieudutour/github-tag-action@v6.2
20+ with :
21+ github_token : ${{ secrets.GITHUB_TOKEN }}
22+
23+ - name : Create a GitHub release
24+ uses : ncipollo/release-action@v1
25+ with :
26+ tag : ${{ steps.tag_version.outputs.new_tag }}
27+ name : ${{ steps.tag_version.outputs.new_tag }}
28+ body : ${{ steps.tag_version.outputs.changelog }}
29+
30+ - name : Source Code Checkout
31+ uses : actions/checkout@v4
32+
33+ - name : Set up Docker Buildx
34+ uses : docker/setup-buildx-action@v3
35+
36+ - name : Login to GitHub Container Registry
37+ uses : docker/login-action@v3
38+ with :
39+ registry : ghcr.io
40+ username : ${{ github.actor }}
41+ password : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - name : Build and push
44+ uses : docker/build-push-action@v6
45+ with :
46+ context : .
47+ file : ./Dockerfile
48+ push : true
49+ tags : |
50+ ghcr.io/${{ github.repository }}:${{ steps.tag_version.outputs.new_tag }}
51+ ghcr.io/${{ github.repository }}:latest
You can’t perform that action at this time.
0 commit comments