Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

ci(openapi): retry push with rebase to absorb concurrent main updates

Beenu Aroraef59ae4651ff
diff --git a/.github/workflows/check-openapi.yml b/.github/workflows/check-openapi.yml
index ffa467d9b..55989ed38 100644
--- a/.github/workflows/check-openapi.yml
+++ b/.github/workflows/check-openapi.yml
@@ -88,7 +88,25 @@ jobs:
git config user.email "[email protected]"
git add docs/openapi.yaml
git diff --staged --quiet || git commit -m "chore: regenerate docs/openapi.yaml [skip ci]"
- git push
+ # Retry the push up to three times with a rebase pull
+ # between attempts. A concurrent push (e.g. another auto-
+ # commit workflow, or a maintainer landing a follow-up fix)
+ # would otherwise fail this job with
+ # `! [rejected] main -> main (fetch first)`, even though
+ # the OpenAPI regeneration itself succeeded.
+ for attempt in 1 2 3; do
+ if git push; then
+ echo "OpenAPI sync pushed on attempt $attempt"
+ break
+ fi
+ if [ "$attempt" = "3" ]; then
+ echo "::error::OpenAPI sync push failed after 3 attempts"
+ exit 1
+ fi
+ echo "Push rejected; pulling --rebase and retrying ($attempt/3)..."
+ git pull --rebase origin main
+ sleep $((attempt * 2))
+ done
env:
ENVIRONMENT: development
SECRET_KEY: ci-dummy-secret-key-at-least-32bytes!