diff --git a/.github/workflows/bootstrap_archives.yml b/.github/workflows/bootstrap_archives.yml index 369aad866fcae0..43eb217cdf0a02 100644 --- a/.github/workflows/bootstrap_archives.yml +++ b/.github/workflows/bootstrap_archives.yml @@ -50,7 +50,7 @@ jobs: id: get_tag run: | new_tag="bootstrap-$(date "+%Y.%m.%d")" - existing_tag_revision=$(git tag | grep "$new_tag" | cut -d- -f3 | cut -dr -f2) + existing_tag_revision=$(git tag | grep "$new_tag" | sort -r | head -n 1 | cut -d- -f3 | cut -dr -f2) if [ -n "$existing_tag_revision" ]; then tag_rev=$((existing_tag_revision + 1)) else