Skip to content

Commit 35acfa9

Browse files
authored
feat: Wait for release to be deleted
1 parent b8585f0 commit 35acfa9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

entrypoint.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ INPUT_TITLE="$(echo "$INPUT_TITLE" | tr -d ' ')"
1616
{ gh release view "$INPUT_TAG" >/dev/null 2>&1; rc=$?; } || :
1717

1818
if (( rc == 0 )); then
19-
echo "Release tag $INPUT_TAG does already exists, it will be replaced..."
19+
echo "Release $INPUT_TAG does already exists, it will be deleted first..."
2020
gh release delete "$INPUT_TAG" --cleanup-tag --yes
21-
sleep 3
21+
22+
# Workaround for https://github.com/cli/cli/issues/8458
23+
while git fetch --tags --prune-tags; git tag -l | grep "$INPUT_TAG"; do
24+
echo "Waiting for release $INPUT_TAG to be deleted.."
25+
sleep 3
26+
done
2227
fi
2328

2429
if [ -z "$INPUT_COMMIT" ]; then

0 commit comments

Comments
 (0)