Skip to content

Commit 204f66b

Browse files
authored
Merge pull request #58 from jkaninda/develop
fix: fix github action by getting tag name
2 parents 07d717f + e0b40ed commit 204f66b

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22
on:
33
push:
44
tags:
5-
- v**
5+
- v**
66
env:
77
BUILDKIT_IMAGE: jkaninda/mysql-bkup
88
jobs:
@@ -12,13 +12,13 @@ jobs:
1212
packages: write
1313
contents: read
1414
steps:
15-
-
15+
-
1616
name: Set up QEMU
1717
uses: docker/setup-qemu-action@v3
18-
-
18+
-
1919
name: Set up Docker Buildx
2020
uses: docker/setup-buildx-action@v3
21-
-
21+
-
2222
name: Login to DockerHub
2323
uses: docker/login-action@v3
2424
with:
@@ -30,6 +30,10 @@ jobs:
3030
registry: ghcr.io
3131
username: ${{ github.actor }}
3232
password: ${{ secrets.GITHUB_TOKEN }}
33+
-
34+
name: Get the tag name
35+
id: get_tag_name
36+
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3337
-
3438
name: Build and push
3539
uses: docker/build-push-action@v3
@@ -38,8 +42,8 @@ jobs:
3842
file: "./docker/Dockerfile"
3943
platforms: linux/amd64,linux/arm64,linux/arm/v7
4044
tags: |
41-
"${{env.BUILDKIT_IMAGE}}:${{env.GITHUB_REF_NAME}}"
42-
"${{env.BUILDKIT_IMAGE}}:latest"
43-
"ghcr.io/${{env.BUILDKIT_IMAGE}}:${{env.GITHUB_REF_NAME}}"
44-
"ghcr.io/${{env.BUILDKIT_IMAGE}}:latest"
45+
"${{env.BUILDKIT_IMAGE}}:${{ env.TAG_NAME }}"
46+
"${{env.BUILDKIT_IMAGE}}:latest"
47+
"ghcr.io/${{env.BUILDKIT_IMAGE}}:${{ env.TAG_NAME }}"
48+
"ghcr.io/${{env.BUILDKIT_IMAGE}}:latest"
4549

0 commit comments

Comments
 (0)