File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 2626 set -x
2727 echo "org=${TARGET_GITHUB_REPOSITORY%%/*}" >>$GITHUB_OUTPUT &&
2828 echo "repo=${TARGET_GITHUB_REPOSITORY#*/}" >>$GITHUB_OUTPUT &&
29+ test workflow_dispatch != '${{ github.event_name }}' || {
30+ echo "result=true" >>$GITHUB_OUTPUT
31+ exit 0
32+ }
2933 source="$(git ls-remote "$SOURCE_REPOSITORY" master)" &&
3034 target="$(git ls-remote https://github.com/"$TARGET_GITHUB_REPOSITORY" lore-$LORE_EPOCH)" &&
3135 echo "result=$(test "${source%% *}" = "${target%% *}" && echo false || echo true)" >>$GITHUB_OUTPUT
5155 env :
5256 GITHUB_TOKEN : ${{ steps.token.outputs.token }}
5357 run : |
54- git push https://$GITHUB_ACTOR:[email protected] /$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH 58+ backoff=0
59+ while (
60+ git push https://$GITHUB_ACTOR:[email protected] /$TARGET_GITHUB_REPOSITORY lore-$LORE_EPOCH; 61+ echo $? >exit.code
62+ ) 2>&1 | tee output.log; exit_code="$(cat exit.code)"; test 0 != "$exit_code" && grep 403 output.log
63+ do
64+ backoff=$(($backoff+1))
65+ test 10 -gt $backoff || {
66+ echo '::error::Failed too many times' >&2
67+ exit $exit_code
68+ }
69+ printf '::warning::access token somehow not yet active; sleeping for %d seconds\nexit code: %s\n' \
70+ $backoff $(cat exit.code)
71+ sleep $backoff
72+ done
73+ exit $exit_code
You can’t perform that action at this time.
0 commit comments