File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,18 @@ jobs:
3232 registry : ${{ env.REGISTRY }}
3333 username : ${{ github.actor }}
3434 password : ${{ secrets.GITHUB_TOKEN }}
35+
36+ - name : get docker image tag
37+ id : get-tag
38+ run : echo "TAG=$(echo ${{ github.event.release.name }} | cut -c2-)" >> $GITHUB_ENV
39+
3540 - name : Extract metadata (tags, labels) for Docker
3641 id : meta
3742 uses : docker/metadata-action@v5
3843 with :
3944 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4045 tags : |
41- type=raw,value=${{ github.event.release.name }}
46+ type=raw,value=$TAG
4247 type=raw,value=latest
4348 - name : Build and push Docker image
4449 id : push
Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ name: Release
33permissions :
44 contents : write
55
6+ on :
7+ push :
8+ tags :
9+ - v[0-9]+.*
10+
611jobs :
712
813 build :
914 name : Build binary file on ${{ matrix.os }}
1015 runs-on : ${{ matrix.os }}
11- if : startsWith(github.ref, 'refs/tags/') && matches(github.ref_name, '^[0-9]+\\.[0-9]+\\.[0-9]+$')
1216 strategy :
1317 matrix :
1418 os : [ macos-latest, windows-latest, ubuntu-latest ]
You can’t perform that action at this time.
0 commit comments