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 : Build & Deploy to PROD
1+ name : Publish Docker Image
22
33on :
44 release :
55 types : [published]
66 branches : [main]
77
8- workflow_call :
9- inputs :
10- tag_name :
11- description : Docker image tag / Release tag
12- required : true
13- type : string
14- target_commitish :
15- description : Branch to build from
16- required : true
17- type : string
18-
198jobs :
209 deploy :
21- if : ${{ inputs.target_commitish == 'main' || github.event.release.target_commitish == 'main' }}
22- name : Build & Deploy
10+ name : Build & Push Docker Image
2311 runs-on : ubuntu-latest
2412
2513 permissions :
2614 contents : read
2715 packages : write
2816
2917 env :
30- RELEASE_TAG : ${{ inputs.tag_name || github.event.release.tag_name }}
18+ RELEASE_TAG : ${{ github.event.release.tag_name }}
3119
3220 steps :
3321 - name : Checkout code
@@ -49,15 +37,15 @@ jobs:
4937 username : ${{ github.actor }}
5038 password : ${{ secrets.GITHUB_TOKEN }}
5139
52- - name : Generate Docker metadata
40+ - name : Generate Docker Metadata
5341 id : meta
5442 uses : docker/metadata-action@v5
5543 with :
5644 images : ghcr.io/${{ github.repository }}
5745 tags : |
5846 type=semver,pattern={{version}},value=${{ env.RELEASE_TAG }}
5947
60- - name : Build & Push Docker image
48+ - name : Build & Push Docker Image
6149 uses : docker/build-push-action@v5
6250 with :
6351 context : .
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments