fix(compat): commit as git_admin (only Gitea-known user passes pre-receive hook)
All checks were successful
addon-qualify / qualify (push) Successful in 11s

This commit is contained in:
compat-seeder
2026-05-10 17:02:48 +03:00
parent ed0e835863
commit 32556761c1

View File

@@ -146,8 +146,14 @@ jobs:
for major in 18.0 19.0; do git worktree remove --force "addons-$major" || true; done for major in 18.0 19.0; do git worktree remove --force "addons-$major" || true; done
rm -rf compat-bootstrap/per-major rm -rf compat-bootstrap/per-major
git config user.email "compat-seeder@odoosky.cloud" # Author identity must match a real Gitea user — the
git config user.name "compat-seeder" # branch-protection pre-receive hook calls GetUserByID against
# the committer email and rejects with "Internal Server Error"
# (uid=-2) when no match exists. compat-seeder doesn't have a
# Gitea account; the COMPAT_PUSH_TOKEN is git_admin's anyway,
# so commit + push under that identity for a clean audit trail.
git config user.email "m@havari.me"
git config user.name "git_admin"
if [ ! -f compat-bootstrap/seeded-ci.json ]; then if [ ! -f compat-bootstrap/seeded-ci.json ]; then
echo "ERROR: seeded-ci.json was not produced; aborting" echo "ERROR: seeded-ci.json was not produced; aborting"
@@ -166,7 +172,7 @@ jobs:
stamp=$(python3 -c "import json,sys; print(json.load(open('compat-bootstrap/seeded-ci.json'))['stampId'])") 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})" git commit -m "chore(compat): refresh cold-start seed (${stamp})"
# Push via token. COMPAT_PUSH_TOKEN is a repo-scoped PAT with # Push via token. COMPAT_PUSH_TOKEN belongs to git_admin and
# write access to odoo-tower/odoo-addons:compat-bootstrap. # is whitelisted on the compat-bootstrap branch protection.
remote="https://compat-seeder:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git" remote="https://git_admin:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git"
git push "$remote" HEAD:compat-bootstrap git push "$remote" HEAD:compat-bootstrap