File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 44 release :
55 types : [published]
66
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : " Tag Git to build"
11+ required : true
12+
713jobs :
814 build-and-push :
915 runs-on : ubuntu-latest
1319 packages : write
1420
1521 steps :
22+ - name : Resolve tag
23+ id : tag
24+ run : |
25+ if [ "${{ github.event_name }}" = "release" ]; then
26+ echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
27+ else
28+ echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
29+ fi
30+
1631 - name : Checkout repository
1732 uses : actions/checkout@v4
33+ with :
34+ ref : ${{ steps.tag.outputs.tag }}
1835
1936 - name : Set lowercase repository name
2037 id : repo
4057 cache-to : type=gha,mode=max
4158 tags : |
4259 ghcr.io/${{ steps.repo.outputs.repo_lc }}-backend:latest
43- ghcr.io/${{ steps.repo.outputs.repo_lc }}-backend:${{ github.event.release.tag_name }}
60+ ghcr.io/${{ steps.repo.outputs.repo_lc }}-backend:${{ steps.tag.outputs.tag }}
4461
4562 - name : Build and push frontend image
4663 uses : docker/build-push-action@v6
5269 cache-to : type=gha,mode=max
5370 tags : |
5471 ghcr.io/${{ steps.repo.outputs.repo_lc }}-frontend:latest
55- ghcr.io/${{ steps.repo.outputs.repo_lc }}-frontend:${{ github.event.release.tag_name }}
72+ ghcr.io/${{ steps.repo.outputs.repo_lc }}-frontend:${{ steps.tag.outputs.tag }}
73+
You can’t perform that action at this time.
0 commit comments