Add .gitea/workflows/renovate.yml (daily 03:17 UTC and workflow_dispatch with a dry_run choice), using the job token and a digest-pinned renovate/renovate container, so no Kamino code runs in the production cluster. renovate.json runs scripts/bump_image_versions.py origin/main as a postUpgradeTasks command for the image inputs, and the workflow's own container pin is excluded from bot bumps. Document the dry run, the unverified points and the open decision on CI triggering for job-token pull requests. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
3.9 KiB
3.9 KiB
Contributing
- Open a pull request against
main. A first-time contributor's fork pull request needs a maintainer's approval before workflows run (Gitea waives this once you have a merged pull request). Workflows on fork pull requests get no secrets and a read-only token. - Commit messages follow Conventional Commits
(
feat:,fix:,docs:,ci:...). CI checks every commit. - Every user-visible change needs a changelog fragment in
changelogs/fragments/(antsibull-changelog format, a YAML file with a section such asminor_changes:orbugfixes:). Pure CI or docs changes usetrivial:. - Role variables carry the role name as a prefix (
<role>_<name>). - Third-party material needs an SPDX header, a
REUSE.tomlannotation (it overrides file headers) and an entry inNOTICE. - Set up the tooling once per clone with
scripts/dev-setup.sh: it creates a virtualenv with the pinned tools (requirements-dev.txt) and installs git hooks that find them. Thenpre-commit run --all-filesbefore pushing. - Never commit credentials, tokens or key material.
- Releases are cut by the maintainer: bump
versioningalaxy.yml, add arelease_summary:fragment, runantsibull-changelog releasein a release PR (commit the generatedCHANGELOG.rstandchangelogs/.plugin-cache.yaml), then push an annotatedvX.Y.Ztag.
Dependency and image updates
requirements-dev.txt,.pre-commit-config.yamlandimages/**are inputs of the CI and molecule images. A pull request that changes one needs a higherversion:for that image in.gitea/workflows/image.yml(python3 scripts/bump_image_versions.pymakes the edit; theCheck image versions were bumpedstep enforces it). After the merge,image.ymlbuilds the image onmain, and a second pull request moves theimage:<version>@sha256:<digest>pins inlint.yml,build.ymlandmolecule.ymlto the printed digest. That second pull request touches noimage.ymltrigger path, so it rebuilds nothing.- These files are in
galaxy.ymlbuild_ignore: such bumps do not change the Collection or its version. A change consumers can see needs a changelog fragment, and only the maintainer bumps the version and tags. renovate.jsonconfigures dependency bumps (minor and patch automerge, majors by hand). Renovate runs for this repository in.gitea/workflows/renovate.yml(daily cron on the Collection's own runner, with the workflow's job token; no cluster code involved). To dry-run after changing the config: Actions > Renovate > Run workflow withdry_run=true, then read the debug log. Whether pull requests opened with the job token start the PR workflows is unverified; if not, they need a manual lint run (open decision, see CLAUDE.md). Pull requests fromrenovate/branches must passscripts/check_bot_pr_diff.py, which only allows version, tag, digest and pin lines.- Workflows must not mention
git.rkdr.net/defame1297/(the production image set); theCheck image pinsstep fails if they do.
Maintainer setup
Settings the workflows cannot enforce and the repository needs before it accepts outside contributions:
- Protect the
v*tags so only maintainers can create them. A tag run uses the workflow files of the tagged commit and may receive organisation secrets. - Protect
main: pull request required, with theLintandBuildchecks. Molecule is not a required check: its path filter would leave the check pending forever on a pull request that touches no role. - The image workflow (
.gitea/workflows/image.yml) tries the Actions job token first; Gitea 28 refuses it for an organisation's packages, so it pushes with the organisation secretsPACKAGE_PUSH_USERandPACKAGE_PUSH_TOKEN(a bot user with write access to the organisation's packages and a token with only thewrite:packagescope). Keep those the only credentials stored at organisation level.