mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-02-14 20:29:00 -06:00
validate release tag
This commit is contained in:
9
.github/workflows/update-charts.yml
vendored
9
.github/workflows/update-charts.yml
vendored
@@ -21,7 +21,12 @@ jobs:
|
||||
run: |
|
||||
cd hatchet-charts
|
||||
|
||||
RELEASE_TAG="${{ github.event.release.tag_name }}"
|
||||
RAW_TAG="${{ github.event.release.tag_name }}"
|
||||
if ! echo "$RAW_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9\-\.]+)?$'; then
|
||||
echo "Invalid release tag format: $RAW_TAG" >&2
|
||||
exit 1
|
||||
fi
|
||||
RELEASE_TAG="$RAW_TAG"
|
||||
VERSION_NUMBER="${RELEASE_TAG#v}"
|
||||
|
||||
echo "Updating charts to use release tag: $RELEASE_TAG (version: $VERSION_NUMBER)"
|
||||
@@ -65,6 +70,6 @@ jobs:
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git add .
|
||||
git commit -m "Update charts to ${{ github.event.release.tag_name }}"
|
||||
git commit -m "Update charts to $RELEASE_TAG"
|
||||
git push
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user