Skip to content

Commit 616f669

Browse files
committed
rety
1 parent 2664033 commit 616f669

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
# authenticated GitHub API, which works for private repos and public alike. Raw URLs
8989
# 404 on private repos (they need an ephemeral per-user token the app cannot store).
9090
list_url="github:${GITHUB_REPOSITORY}/index.json"
91-
git clone --depth 1 "https://x-access-token:${MAIN_INDEX_TOKEN}@github.com/Bespok3d/main-index.git" main-index
91+
git clone "https://x-access-token:${MAIN_INDEX_TOKEN}@github.com/Bespok3d/main-index.git" main-index
9292
mkdir -p main-index/lists
9393
printf '{\n "name": "Reference Python Plugins",\n "url": "%s"\n}\n' "$list_url" \
9494
> "main-index/lists/${repo_name}.json"
@@ -100,5 +100,10 @@ jobs:
100100
echo "list reference unchanged; nothing to commit"
101101
else
102102
git commit -m "register ${repo_name} sub-list"
103-
git push
103+
for attempt in 1 2 3 4 5; do
104+
git push && { echo "pushed main-index (attempt ${attempt})"; break; }
105+
[ "$attempt" = 5 ] && { echo "main-index push failed after ${attempt} attempts"; exit 1; }
106+
echo "main-index push rejected; rebasing on remote main (attempt ${attempt})"
107+
git pull --rebase --no-edit origin main
108+
done
104109
fi

0 commit comments

Comments
 (0)