refactor(ci): migrate to centralized tankdonut/github-actions@v1 - #56
Merged
Conversation
Replace the monolithic .github/workflows/ci.yml (3-job pipeline) with four
focused workflows that consume reusable actions from tankdonut/github-actions@v1,
mirroring the pattern already in use for tankdonut/toolbx-containers.
Workflows:
- lint-and-test.yaml — pre-commit@v1 on every PR + push to main
- build-and-publish-image.yaml — validate.sh -> build.sh -> container-test.sh
-> trivy -> ghcr-login@v1 (runtime: docker)
-> triple-push to ghcr.io (non-PR only)
Weekly schedule + disk-space freeing step
- prune-ghcr-images.yaml — reusable prune-ghcr.yaml@v1, daily cron,
packages: ["opencoder"]
- renovate-auto-approve.yaml — renovate-auto-approve@v1 on Renovate PRs,
concurrency-grouped
renovate.json now matches the centralized config (platformAutomerge,
automergeStrategy: squash, three packageRules); minimumReleaseAge=7 days
preserved to match the AGENTS.md supply-chain guardrails.
ci-status aggregator job dropped (no cross-workflow needs); branch
protection must move to Lint & Test + Build & Publish Image required
checks.
Manual post-merge steps (out-of-repo):
- Create AUTO_APPROVE_PAT repo secret (PAT with PR-approve scope)
- Update branch-protection required checks
- Enable 'Allow GitHub Actions to approve pull requests' for platformAutomerge
Verification: yaml.safe_load on all 4 workflows; jq on renovate.json;
pre-commit run --files clean; actionlint reports only the upstream-matching
SC2086 info on $GITHUB_ENV.
The centralized tankdonut/github-actions/actions/pre-commit@v1 action internally calls install-asdf-dependencies@v1, which reads .tool-versions and installs declared tools via asdf. Without this file, hadolint is never installed and the pre-commit hadolint hook fails with 'Executable hadolint not found'. toolbx-containers ships the same .tool-versions pattern; this matches it. Version 2.14.0 aligns with the hadolint hook pin in .pre-commit-config.yaml.
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.
Summary
Replaces the monolithic
.github/workflows/ci.yml(3-job pipeline) with four focused workflows that consume reusable actions fromtankdonut/github-actions@v1, mirroring the pattern already in production fortankdonut/toolbx-containers.Workflows
lint-and-test.yamlpre-commit@v1mainbuild-and-publish-image.yamlghcr-login@v1(runtime: docker)main(paths), weekly schedule,workflow_dispatchprune-ghcr-images.yamlprune-ghcr.yaml@v1workflow_dispatchrenovate-auto-approve.yamlrenovate-auto-approve@v1build-and-publish-image.yamlpreserves every opencode-specific step:validate.sh → build.sh → tag (sha, version, latest) → container-test.sh → trivy (advisory) → ghcr-login → triple-push. Publish is gatedif: github.event_name != 'pull_request'so PR runs validate everything without publishing.renovate.jsonNow matches the centralized config:
platformAutomerge: true,automergeStrategy: squash, threepackageRules(non-major automerge, devDeps automerge, major manual).minimumReleaseAge: "7 days"preserved — matches the AGENTS.md supply-chain guardrails (npmrc min-release-age=7,uv exclude-newer=7d).Removed
ci.ymldeleted entirely.ci-statusaggregator job dropped (no cross-workflowneeds).setup-nodestep dropped (validate.shis pure bash; no node dependency).masterbranch trigger +tests/**path filter dropped (vestigial).Doc updates
README badge swapped to
build-and-publish-image.yaml; everyci.ymlreference updated acrossAGENTS.md,DEVELOPMENT.md,scripts/AGENTS.md,tests/AGENTS.md(file tree, CI Integration section, File Inventory table, code-comment pointers).Verification
python3 yaml.safe_loadparses all 4 workflowsjq . renovate.jsonvalidates (minimumReleaseAge=7 days,platformAutomerge=true,automergeStrategy=squash, 3packageRules)tankdonut/github-actions@v1pre-commit run --filesclean (trailing whitespace, EOF, mixed-line-ending, large files, merge conflicts, private key)actionlintreports only one info-level SC2086 on\$GITHUB_ENV(unquoted) — matches upstream toolbx + original ci.yml convention; runner-provided absolute path, no functional issueThese cannot be done in-repo and are required for full functionality:
AUTO_APPROVE_PATrepo secret — classic PAT withreposcope, or fine-grained token with PR-approve permission. Without it,renovate-auto-approve.yamlfails on every Renovate PR.main: the oldCI / CI Statusaggregator no longer exists. RequireLint & Test / pre-commit+Build & Publish Image / release.platformAutomergeto function.Test plan
Lint & Test+Build & Publish Image)gh workflow listshows the 4 new workflowsgh workflow run prune-ghcr-images.yamldispatches without error