mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
ci: retry workflow validation dry-runs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ab0ee652e1
commit
297f499e37
1 changed files with 24 additions and 3 deletions
|
|
@ -3,6 +3,27 @@ set -euo pipefail
|
|||
|
||||
actionlint .github/workflows/*.yml
|
||||
|
||||
act workflow_dispatch -W .github/workflows/release.yml -e .github/act/dry-run.json -n
|
||||
act push -W .github/workflows/release.yml -e .github/act/push-feat.json -n
|
||||
act workflow_dispatch -W .github/workflows/docker.yml -e .github/act/docker-version.json -n
|
||||
run_act() {
|
||||
local attempt=1
|
||||
local max_attempts=3
|
||||
local delay_seconds=5
|
||||
|
||||
while true; do
|
||||
if "$@"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if (( attempt >= max_attempts )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "act dry-run failed on attempt ${attempt}/${max_attempts}; retrying in ${delay_seconds}s..." >&2
|
||||
sleep "${delay_seconds}"
|
||||
attempt=$((attempt + 1))
|
||||
delay_seconds=$((delay_seconds * 2))
|
||||
done
|
||||
}
|
||||
|
||||
run_act act workflow_dispatch -W .github/workflows/release.yml -e .github/act/dry-run.json -n
|
||||
run_act act push -W .github/workflows/release.yml -e .github/act/push-feat.json -n
|
||||
run_act act workflow_dispatch -W .github/workflows/docker.yml -e .github/act/docker-version.json -n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue