Add a bump bot that opens update pull requests for recipes (#30)

A daily workflow compares each recipe with its upstream's newest stable
release and opens one pull request when the image for it is published:
version, image tag and multi-arch digest only. bump/track.yml holds where
each project releases and how its image tag follows the version; it lives
outside cottage.yml because Hearth reads that file strictly. Patch and
minor releases wait 3 days, majors 14. A guard check fails a bump branch
that changes anything else, and 'scripts/bump.py audit' shows how far
behind each recipe is.
This commit is contained in:
michael authored and GitHub committed 2026-11-23 04:33:21 -05:00
1 parent ad8148af74
commit 5796d0eebb
5 files changed
+770

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
name: Bump recipes
# Opens one pull request per recipe whose upstream has a newer stable release (scripts/bump.py).
# Pull requests opened with the default GITHUB_TOKEN don't start other workflows, so set the
# BUMP_TOKEN secret (a GitHub App installation token or a fine-grained token with contents and
# pull-requests write) for CI to run on them.
on:
schedule: [{ cron: "17 6 * * *" }]
workflow_dispatch:
permissions: { contents: write, pull-requests: write }
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0, token: "${{ secrets.BUMP_TOKEN || secrets.GITHUB_TOKEN }}" }
- run: pip install --quiet pyyaml
- name: Open bump pull requests
env: { GH_TOKEN: "${{ secrets.BUMP_TOKEN || secrets.GITHUB_TOKEN }}" }
run: |
git config user.name "Cottage catalog bot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
python3 scripts/bump.py run
+12
View File
@@ -28,6 +28,18 @@ jobs:
sys.exit(1 if bad else 0)
PY
# Automatic bump branches may only change versions, image tags and digests, and never an image's
# repository, so they can't widen what the platform's image allowlist accepts.
bump-guard:
name: Bump guard
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'bump/')
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- run: pip install --quiet pyyaml
- run: python3 scripts/bump.py guard "origin/${{ github.base_ref }}"
# Parameters follow schema/cottage.schema.json ($defs/parameter), and recipes that send mail
# use the shared SMTP_* fields in group "email".
parameters: