File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments