diff --git a/.github/workflows/build-push-fe-docker-hub.yaml b/.github/workflows/build-push-fe-docker-hub.yaml index 9590dde45..82fdf2240 100644 --- a/.github/workflows/build-push-fe-docker-hub.yaml +++ b/.github/workflows/build-push-fe-docker-hub.yaml @@ -54,9 +54,16 @@ jobs: - name: Determine next version id: determine_version run: | - # Get the latest tag - LATEST_TAG=$(git describe --tags --abbrev=0) - # Calculate next version + # Check if any tags exist + if git tag -l | grep -q '^v'; then + # Get the latest tag + LATEST_TAG=$(git describe --tags --abbrev=0) + else + # If no tags, set the initial tag + LATEST_TAG='v0.0.0' + fi + + # Run semantic-release to get the next version NEXT_VERSION=$(npx semantic-release --dry-run | grep 'Next version' | awk '{print $NF}') echo "NEXT_VERSION=${NEXT_VERSION}" >> $GITHUB_ENV