Skip to content

Commit 7d3a323

Browse files
committed
fix: make tag creation idempotent on re-dispatch
Tag creation now checks if tag already exists before attempting to create it, preventing failures on re-dispatched events.
1 parent 88e499f commit 7d3a323

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/sync-schema.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,9 @@ jobs:
6868
git diff --cached --quiet && echo "No changes" && exit 0
6969
git commit -m "chore: sync schema and version to workflow ${WORKFLOW_VERSION}"
7070
git push
71-
git tag "${WORKFLOW_VERSION}"
72-
git push origin "${WORKFLOW_VERSION}"
71+
if git rev-parse "${WORKFLOW_VERSION}" >/dev/null 2>&1; then
72+
echo "Tag ${WORKFLOW_VERSION} already exists, skipping"
73+
else
74+
git tag "${WORKFLOW_VERSION}"
75+
git push origin "${WORKFLOW_VERSION}"
76+
fi

0 commit comments

Comments
 (0)