ci(lint): validate renovate.json in the pinned Renovate image

Add a renovate-config job to Lint that runs renovate-config-validator
--strict --no-global in a copy of renovate.yml's Renovate image, so the
config is checked by the Renovate that runs it and the check can be
required. The ci image stays without Node.

check_bot_pr_diff.py now lets a bot pull request move the tag and digest
of the renovate/renovate image line in renovate.yml and lint.yml, in
place, keeping the name and the -full flavour. A test holds the two pins
equal.

Refs: #188
Assisted-by: Claude Code
This commit is contained in:
Defame1297 committed 2026-12-06 17:01:55 +00:00
1 parent d1db4fb0db
commit 763ec5dfd3
4 files changed
+145 -11

No files matched your search

+8 -1
View File
@@ -39,7 +39,8 @@ issue.
while a content check must see the content it is given. *Held:* review (`CODEOWNERS`).
- **A pull request from a `renovate/` branch changes only version, tag, digest and pin lines**
(tool pins with their lock entries and hashes, hook `rev:` lines, Dockerfile `FROM` tags and
digests, `job_image:` pins, consumer image pins). In `pyproject.toml` only a pin's version
digests, `job_image:` pins, consumer image pins, and the tag and digest of the Renovate image
line of `renovate.yml` and of its copy in `lint.yml`). In `pyproject.toml` only a pin's version
moves; in `uv.lock` only apm-cli moves, to that pin, with its files from PyPI by sha256, and
every other package stays as it is.
*Why:* the bot's minor and patch pull requests automerge, so they must not be able to change
@@ -71,6 +72,12 @@ issue.
- **Triggers:** both run on pull requests to `main` and on manual dispatch; Build also runs on
`v*` tags, where it checks the tag against `galaxy.yml`. *Why:* the tag is what consumers
install. *Held:* review.
- **Lint's `renovate-config` job runs `renovate-config-validator --strict --no-global` on
`renovate.json`, in the same Renovate image as `renovate.yml`, on every run with no `if:`.**
Renovate moves both pins in one pull request. *Why:* the config is checked by the Renovate
that runs it, and a check that always reports can be required. *Held:* control:
`test_the_renovate_image_pins_are_the_same` in `tests/scripts/test_check_bot_pr_diff.py` for
the equal pins; review for the job.
## Molecule
+27 -1
View File
@@ -3,7 +3,7 @@ name: Lint
# Runs only on the Collection's own runner (label kamino-docker, scoped to the mortis org).
# No org secret is used: the only credential is the
# job token (secrets.GITHUB_TOKEN), which is read-only for a fork pull request. No pull_request_target.
# The tools come from the ci image (images/ci, built by image.yml): the pinned Python
# The lint job's tools come from the ci image (images/ci, built by image.yml): the pinned Python
# tools of requirements-dev.txt, the collections of requirements.yml and the hook
# environments of .pre-commit-config.yaml are baked in. When a PR changes one of those
# files the checksum check below fails and the job installs the pinned tools and
@@ -148,3 +148,29 @@ jobs:
echo "Checking $sha"
pre-commit run --hook-stage commit-msg --commit-msg-filename "$MSG_FILE"
done
# renovate.json checked by the validator of the Renovate that runs it. The image is a copy of
# renovate.yml's pin (test_the_renovate_image_pins_are_the_same); the ci image has no Node.
renovate-config:
runs-on: kamino-docker
timeout-minutes: 5
container:
image: renovate/renovate:44.161.0-full@sha256:ddbf02e44b542343c9df696b88fd953f04cc3ee5f771221805ff8efb26595416
steps:
# The image runs as a non-root user, so the clone goes to a directory it owns.
- name: Validate renovate.json
env:
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: http.extraheader
GIT_CONFIG_VALUE_0: "AUTHORIZATION: bearer ${{ secrets.GITHUB_TOKEN }}"
SHA: ${{ github.event.pull_request.head.sha || github.sha }}
REF: ${{ github.ref }}
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
run: |
src="$(mktemp -d)"
git clone "$REPO_URL" "$src"
cd "$src"
git checkout "$SHA" || { git fetch origin "$REF" && git checkout "$SHA"; }
echo "Checked out $(git rev-parse HEAD)"
# --no-global: renovate.json is a repository config, not the bot's global one.
renovate-config-validator --strict --no-global renovate.json