ci: automate the template's action pins - #62
Draft
tsvikas wants to merge 5 commits into
Draft
Conversation
Dependabot cannot reach the pins under project_name/.github/workflows/. Its
github-actions ecosystem only parses *.yml/*.yaml, and three of the four
template workflows are .jinja. Renaming them does not help either, because
Jinja control blocks inside a `steps:` sequence are not parseable YAML
(dependabot-core#5970 tracks the general gap). Until now those pins only moved
when someone bumped them by hand, which is how they drifted.
pinact rewrites line by line rather than parsing YAML, so the templating is
irrelevant to it, including the file named
"{% if in_pypi %}build-and-publish.yml{% endif %}.jinja".
Scoped to project_name/ on purpose: the root workflows stay with Dependabot,
since two updaters over the same lines would produce competing PRs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JP6NCazpaMz2Xfejds3mxq
The original cadence just mirrored dependabot's. That matching is not worth much here: this updater has no cooldown equivalent to dependabot's cooldown.default-days, so the tradeoff is different. A monthly run keeps each PR down to a handful of pins, which is the difference between reviewing a bump and rubber-stamping one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JP6NCazpaMz2Xfejds3mxq
tsvikas
force-pushed
the
ci/automate-template-action-pins
branch
from
July 26, 2026 12:14
e7132aa to
23e8c85
Compare
Mirrors cooldown.default-days in .github/dependabot.yml, which the updater otherwise had no equivalent of. --min-age carries a second behaviour worth keeping rather than suppressing (config `min_age.always: false` would drop it): the run fails outright when a pin already in the tree is younger than the threshold. The updater itself can never introduce one, since it will not move a pin onto a release that young, so a pin that fresh arrived by hand. That is the case worth stopping for. It fails right now for exactly that reason: setup-uv v9.0.0 was pinned in 80fe49b while its commit was 5 days old. It crosses the line on 2026-07-28, before the next scheduled run on 2026-08-01. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JP6NCazpaMz2Xfejds3mxq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the gap found while auditing the action pins: nothing watches
project_name/.github/workflows/, so those pins drift silently until someonebumps them by hand.
Why not Dependabot
Its
github-actionsecosystem only parses*.yml/*.yaml. Three of the fourtemplate workflows are
.jinja, so it sees onlydeps-update.yml. Settingdirectory: /project_namewould point it at the right folder (forgithub-actions,
directory: foomeansfoo/.github/workflows) but would notchange which extensions it parses. Renaming the templates is not available
either:
ci.yml.jinjahas lines like{%- if format_tool == "black" %}insidea
steps:sequence, which is not parseable YAML. The general request isdependabot-core#5970,
still open.
pinactrewrites line by line instead of parsing YAML, so the templating isirrelevant to it.
Design notes
project_name/. Root workflows stay with Dependabot. Runningboth over the same lines would produce competing PRs.
# release/v1) needs onepass to resolve the comment to the version the SHA actually is, and only then
can the next pass see a newer release exists. Verified: one pass took
gh-action-pypi-publishfrom# release/v1only as far as# v1.14.0; thesecond reached
v1.14.1. The second pass is a no-op once converged.xargs -0 -r.-0because one template filename contains spaces.-rbecause with no file arguments pinact falls back to scanning
.github/workflows, which would silently retarget the step at the rootworkflows if the glob ever stopped matching.
--min-age 7. Gates updates the waycooldown.default-daysdoes forDependabot: a pin will not move onto a release whose commit is younger than 7
days. It also fails the run when a pin already in the tree is that young, which
is kept deliberately rather than suppressed via
min_age.always: false-- theupdater cannot introduce such a pin itself, so one that fresh got there by hand.
Note this fails today, because
setup-uv v9.0.0was pinned in 80fe49b at 5 daysold. It clears on 2026-07-28, ahead of the first scheduled run on 2026-08-01.
checksums.txt.Verification
Ran the exact command from the workflow against a clone of this branch, with
checkout(9 sites,.jinja),prek-action(.jinja) andgh-action-pypi-publish(the{% raw %}{% if in_pypi %}{% endraw %}file) reverted to olderSHAs and stale comments. It restored every one and the net diff against HEAD
came back empty. actionlint, zizmor, check-github-workflows and yamllint all
pass on the new workflow.
Not verified end to end: the scheduled run itself. Worth a
workflow_dispatchafter merge.
Known limitation
PRs opened with
GITHUB_TOKENdo not triggeron: pull_requestworkflows, sothe generated PR will not run CI on its own. The template's existing
deps-update.ymlhas the same property. A PAT or GitHub App token in thetoken:input fixes it if that matters.Possible follow-up
pinact run --verifyinuv-tests.ymlwould catch a comment that disagreeswith its SHA, which is exactly the
actions/cache # v5bug this audit turnedup. Left out to keep this focused.