Skip to content

Commit a6a2278

Browse files
committed
get tag from ref (to tag Docker image)
1 parent 73a39f7 commit a6a2278

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
2525

26+
- name: Get the tag
27+
id: get_tag
28+
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
29+
2630
- name: Set up Docker Buildx
2731
uses: docker/setup-buildx-action@v1
2832
- name: Login to GitHub Container Registry
@@ -38,4 +42,4 @@ jobs:
3842
push: true
3943
tags: |
4044
ghcr.io/${{ github.repository_owner }}/git-vertag:latest
41-
ghcr.io/${{ github.repository_owner }}/git-vertag:${{ github.event.tag_name }}
45+
ghcr.io/${{ github.repository_owner }}/git-vertag:${{ steps.get_tag.outputs.TAG }}

0 commit comments

Comments
 (0)