diff --git a/.gitea/workflows/seed-compat.yml b/.gitea/workflows/seed-compat.yml index 01b6d6f..8962c2e 100644 --- a/.gitea/workflows/seed-compat.yml +++ b/.gitea/workflows/seed-compat.yml @@ -111,12 +111,21 @@ jobs: git config user.email "compat-seeder@odoosky.cloud" git config user.name "compat-seeder" - if git diff --quiet -- compat-bootstrap/seeded-ci.json; then + if [ ! -f compat-bootstrap/seeded-ci.json ]; then + echo "ERROR: seeded-ci.json was not produced; aborting" + exit 1 + fi + + # Stage first, then diff against index — this catches both + # "tracked file changed" and "new file appeared" cases. The + # bare `git diff --quiet` form silently passes for untracked + # files (no diff = exit 0), which masked the very-first run. + git add compat-bootstrap/seeded-ci.json + if git diff --cached --quiet -- compat-bootstrap/seeded-ci.json; then echo "no content change in seeded-ci.json; nothing to commit" exit 0 fi - git add compat-bootstrap/seeded-ci.json stamp=$(python3 -c "import json,sys; print(json.load(open('compat-bootstrap/seeded-ci.json'))['stampId'])") git commit -m "chore(compat): refresh cold-start seed (${stamp})"