File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ name: Build and Push Docker image to GHCR
22
33on :
44 push :
5- branches : [ main ]
5+ branches :
6+ - ' **'
67 workflow_dispatch :
78
89jobs :
@@ -30,10 +31,19 @@ jobs:
3031 username : ${{ github.actor }}
3132 password : ${{ secrets.GITHUB_TOKEN }}
3233
34+ - name : Set tag name
35+ id : set_tag
36+ run : |
37+ if [[ "${{ github.ref_name }}" == "main" ]]; then
38+ echo "TAG=pre-alpha" >> $GITHUB_OUTPUT
39+ else
40+ echo "TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT
41+ fi
42+
3343 - name : Build and push Docker image (amd64 + arm64)
3444 uses : docker/build-push-action@v5
3545 with :
3646 context : .
3747 push : true
3848 platforms : linux/amd64,linux/arm64
39- tags : ghcr.io/${{ github.repository }}:pre-alpha
49+ tags : ghcr.io/${{ github.repository }}:${{ steps.set_tag.outputs.TAG }}
You can’t perform that action at this time.
0 commit comments