From c1faf3e10d3431727ff2822ad714aa926be1ea13 Mon Sep 17 00:00:00 2001 From: Roshan Piyush Date: Mon, 29 Apr 2024 01:45:08 +0530 Subject: [PATCH] Strip tag prefix --- .github/workflows/pr-build.yml | 4 +++- .github/workflows/publish.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 3ae7b661..72c3d586 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -32,6 +32,8 @@ jobs: - name: Get branch name id: branch-name uses: tj-actions/branch-names@v8 + with: + strip_tag_prefix: '' - name: Current branch name run: | @@ -43,7 +45,7 @@ jobs: if: steps.branch-name.outputs.is_tag == 'true' run: | echo "TAG_NAME=${{ steps.branch-name.outputs.tag }}" >> ${GITHUB_ENV} - echo "TAG_LATEST=latest" >> ${GITHUB_ENV} + echo "TAG_LATEST=${{ steps.branch-name.outputs.tag }}" >> ${GITHUB_ENV} - name: Running on a branch and merge. if: steps.branch-name.outputs.is_tag != 'true' && github.event_name == 'push' && steps.branch-name.outputs.current_branch != 'main' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9e211ed9..3e5d8a1d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,6 +37,8 @@ jobs: - name: Get branch name id: branch-name uses: tj-actions/branch-names@v8 + with: + strip_tag_prefix: '' - name: Current branch name run: |