Skip to content

Commit

Permalink
fix: tag exist condition
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweaver87 committed Oct 21, 2024
1 parent 15bf545 commit 65c450d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
- name: Check if tag exists
id: tag_exists
run: |
TAG_EXISTS=true
if ! [ $(git tag -l "${{ env.traefik_tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}") ]; then
TAG_EXISTS=false
TAG_EXISTS=false
if git tag -l | grep "${{ env.tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}" > /dev/null ; then
TAG_EXISTS=true
fi
echo TAG_EXISTS=$TAG_EXISTS >> $GITHUB_OUTPUT
Expand All @@ -60,7 +60,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }}
tag_prefix: ${{ env.traefik_tag_prefix }}
tag_prefix: ${{ env.tag_prefix }}
if: steps.tag_exists.outputs.TAG_EXISTS == 'false'

- name: Create release
Expand Down Expand Up @@ -128,9 +128,9 @@ jobs:
- name: Check if tag exists
id: tag_exists
run: |
TAG_EXISTS=true
if ! [ $(git tag -l "${{ env.traefik-crds_tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}") ]; then
TAG_EXISTS=false
TAG_EXISTS=false
if git tag -l | grep "${{ env.crds_tag_prefix }}${{ steps.chart_version.outputs.CHART_VERSION }}" > /dev/null ; then
TAG_EXISTS=true
fi
echo TAG_EXISTS=$TAG_EXISTS >> $GITHUB_OUTPUT
Expand All @@ -140,7 +140,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }}
tag_prefix: ${{ env.traefik-crds_tag_prefix }}
tag_prefix: ${{ env.crds_tag_prefix }}
if: steps.tag_exists.outputs.TAG_EXISTS == 'false'

- name: Create release
Expand Down

0 comments on commit 65c450d

Please sign in to comment.