Skip to content

Commit

Permalink
Fix multiple re-renders of metrics page / update release worker
Browse files Browse the repository at this point in the history
  • Loading branch information
caioricciuti committed May 18, 2024
1 parent 18b74d4 commit 17c2fce
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GHCR_PAT }}

- name: Set up Git
run: |
Expand All @@ -24,7 +22,7 @@ jobs:
run: |
set -e # Fail on first error
# Extract the latest tag, or default to v1.0.0
# Extract the latest tag, or default to v1.0.0 if no tags exist
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` || echo "v1.0.0")
echo "Latest tag: $latest_tag"
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
Expand All @@ -41,6 +39,24 @@ jobs:
echo "New tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_ENV
- name: Check if tag exists
id: tag_check
run: |
set -e # Fail on first error
if git rev-parse "refs/tags/${{ env.new_tag }}" >/dev/null 2>&1; then
echo "Tag already exists."
# Increment the minor version instead
new_minor=$((minor + 1))
new_patch=0
new_tag="v$major.$new_minor.$new_patch"
echo "New incremented tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_ENV
else
echo "Tag does not exist."
echo "new_tag=$new_tag" >> $GITHUB_ENV
- name: Create new tag
run: |
set -e # Fail on first error
Expand Down

0 comments on commit 17c2fce

Please sign in to comment.