Skip to content

Commit eb7fb67

Browse files
committed
ci: update tag
1 parent 7a6a9a5 commit eb7fb67

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/docker-publish.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ name: Release
33
permissions:
44
contents: write
55

6+
on:
7+
push:
8+
tags:
9+
- v[0-9]+.*
10+
611
jobs:
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 ]

0 commit comments

Comments
 (0)