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
All checks were successful
addon-qualify / qualify (push) Successful in 11s
This commit is contained in:
@@ -146,8 +146,14 @@ jobs:
|
||||
for major in 18.0 19.0; do git worktree remove --force "addons-$major" || true; done
|
||||
rm -rf compat-bootstrap/per-major
|
||||
|
||||
git config user.email "compat-seeder@odoosky.cloud"
|
||||
git config user.name "compat-seeder"
|
||||
# Author identity must match a real Gitea user — the
|
||||
# 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
|
||||
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'])")
|
||||
git commit -m "chore(compat): refresh cold-start seed (${stamp})"
|
||||
|
||||
# Push via token. COMPAT_PUSH_TOKEN is a repo-scoped PAT with
|
||||
# write access to odoo-tower/odoo-addons:compat-bootstrap.
|
||||
remote="https://compat-seeder:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git"
|
||||
# Push via token. COMPAT_PUSH_TOKEN belongs to git_admin and
|
||||
# is whitelisted on the compat-bootstrap branch protection.
|
||||
remote="https://git_admin:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git"
|
||||
git push "$remote" HEAD:compat-bootstrap
|
||||
|
||||
Reference in New Issue
Block a user