Central reusable GitHub Actions workflows for Odoo project automation.
Builds a materialized _git_aggregated branch from a repos.yml configuration
using git-aggregator. All addon
repos (oca, custom, private) are merged into a single branch with embedded
.git directories removed.
Deploys the _git_aggregated branch to a staging server via SSH. Pulls the
latest branch and restarts the Odoo Docker container.
| Type | Projects | Template |
|---|---|---|
| Odoo.sh (aggregate only) | hls, kns, nsy, rbkk, thc | caller-aggregate-only.yml |
| Self-hosted (aggregate + deploy) | axls, crh, fal, iai, mi7, pci, qrtl, rmm | caller-aggregate-deploy.yml |
-
Create an
aggregate-configbranch in the project's*-privaterepo:git checkout --orphan aggregate-config git rm -rf . -
Copy the appropriate caller template from
templates/to.github/workflows/aggregate.yml.For self-hosted projects, replace
<STAGING_IP>and<PROJECT_DIR>with actual values from the Ansible inventory. -
Create
repos.ymlwith the project's aggregation config:./addons/oca: remotes: origin: https://github.com/qrtl/<project>-oca.git merges: - origin <version> ./addons/custom: remotes: origin: https://github.com/qrtl/<project>-custom.git merges: - origin <version> ./addons/private: remotes: origin: https://<PAT>@github.com/qrtl/<project>-private.git merges: - origin <version>
-
Commit and push:
git add .github/workflows/aggregate.yml repos.yml git commit -m "[ADD] aggregate-config: auto-aggregate via central workflows" git push origin aggregate-config -
Check the Actions tab to verify the workflow runs.
For projects already using aggregate-config (rbkk-private, hls-repos):
- On the
aggregate-configbranch, replace.github/workflows/aggregate.ymlwith the appropriate caller template. - Delete
scripts/aggregate.py(no longer needed locally). - Commit and push. The existing
repos.ymlworks unchanged.
| Secret | Level | Purpose |
|---|---|---|
GITHUB_TOKEN |
Auto-provided | Pushing to _git_aggregated within the same repo |
STAGING_SSH_KEY |
Org-level | SSH private key for deploy to staging servers |
The odoo_automation SSH key is used for staging deploys. On staging servers,
the from= IP restriction must be removed from authorized_keys to allow
GitHub Actions runners (which use dynamic IPs) to connect. Production servers
keep the from= restriction.
Staging authorized_keys entry:
no-agent-forwarding,no-port-forwarding,no-pty ssh-ed25519 AAAA... quartile
Store the private key as org-level GitHub secret STAGING_SSH_KEY.
repos.yml updated on aggregate-config branch
-> GitHub Actions: gitaggregate.yml builds _git_aggregated
-> (Odoo.sh projects) Odoo.sh picks up the branch and rebuilds
-> (Self-hosted) deploy-staging.yml SSHes into staging, pulls branch, restarts Odoo