Skip to content

Commit

Permalink
action should fail if latest tag cannot be retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Nov 27, 2024
1 parent 296ced3 commit 3e989bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,18 @@ jobs:
fi
fi
# Check if LATEST_TAG is empty or null
if [[ -z "$LATEST_TAG" || "$LATEST_TAG" == "null" ]]; then
echo "ERROR: No latest tag found in the repository."
exit 1
fi
echo "LATEST_TAG=$LATEST_TAG"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
# Step 12: Increment the version number based on the commit message and branch
- name: Update Version
if: ${{ success() }}
env:
LATEST_TAG: ${{ env.LATEST_TAG }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}
Expand Down Expand Up @@ -138,6 +146,7 @@ jobs:
# Step 13: Push the updated version tag to the repository
- name: Push Updated Tag
if: ${{ success() }}
env:
NEW_VERSION: ${{ env.NEW_VERSION }}
BRANCH_NAME: ${{ env.BRANCH_NAME }}
Expand Down

0 comments on commit 3e989bc

Please sign in to comment.