mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 03:38:23 +00:00
Folds the parallel Docker-image and git-ref version-update plumbing
into a single subsystem so the auto-update workflow, the external
freshness tests, and the unit tests all share one module layout.
utils/
update/
base.py # semver primitives shared by both backends
docker.py # OCI registry lookups + version: line rewriter
repository.py # git ls-remote walker + ref: line rewriter
cli/contributing/update/
docker/ # python -m cli.contributing.update.docker
repository/ # python -m cli.contributing.update.repository
scripts/github/update/
image_versions.sh
repository_refs.sh
Tests mirror the same shape under tests/{unit,external}/update/{docker,repository}/.
Also widens the Docker bump scope to all roles (previously gated on
`web-*`) so non-web roles like sys-svc-container get bumped too;
pins Bookwyrm's python image at 3.11-bookworm via
`# nocheck: docker-version` with a TODO until upstream supports
Python >= 3.12.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
114 lines
3.7 KiB
YAML
114 lines
3.7 KiB
YAML
name: "🔄 Update: Versions"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: "30 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
update-docker-image-versions:
|
|
name: 🐳 Update Docker image versions
|
|
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install update dependencies
|
|
run: bash scripts/github/install_update_python.sh
|
|
|
|
- name: Update Docker image versions
|
|
run: bash scripts/github/update/image_versions.sh
|
|
|
|
- name: Check for changes
|
|
id: diff
|
|
run: bash scripts/github/check_git_changes.sh roles
|
|
|
|
- name: Open PR if Docker image versions changed
|
|
if: steps.diff.outputs.changed == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
UPDATE_BRANCH_PREFIX: update/docker-image-versions
|
|
UPDATE_COMMIT_MESSAGE: "update(images): update Docker image versions"
|
|
UPDATE_PR_TITLE: "update(images): update Docker image versions"
|
|
UPDATE_PR_BODY: "Automated update of semver-based Docker image versions in `roles/*/meta/services.yml`."
|
|
UPDATE_BASE_BRANCH: main
|
|
run: bash scripts/github/open_update_pr.sh roles
|
|
|
|
update-repository-refs:
|
|
name: 🌿 Update repository refs
|
|
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install update dependencies
|
|
run: bash scripts/github/install_update_python.sh
|
|
|
|
- name: Update repository refs
|
|
run: bash scripts/github/update/repository_refs.sh
|
|
|
|
- name: Check for changes
|
|
id: diff
|
|
run: bash scripts/github/check_git_changes.sh roles
|
|
|
|
- name: Open PR if repository refs changed
|
|
if: steps.diff.outputs.changed == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
UPDATE_BRANCH_PREFIX: update/repository-refs
|
|
UPDATE_COMMIT_MESSAGE: "update(repos): bump git refs to latest semver tags"
|
|
UPDATE_PR_TITLE: "update(repos): bump git refs to latest semver tags"
|
|
UPDATE_PR_BODY: "Automated update of semver-based git `ref:` values in `roles/*/meta/services.yml`. Upstream tags resolved via `git ls-remote --tags`."
|
|
UPDATE_BASE_BRANCH: main
|
|
run: bash scripts/github/open_update_pr.sh roles
|
|
|
|
update-skills:
|
|
name: 🧠 Update skills-lock.json
|
|
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- name: Update skills
|
|
run: bash scripts/install/skills/update.sh
|
|
|
|
- name: Check for changes
|
|
id: diff
|
|
run: bash scripts/github/check_git_changes.sh skills-lock.json
|
|
|
|
- name: Open PR if skills-lock.json changed
|
|
if: steps.diff.outputs.changed == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
UPDATE_BRANCH_PREFIX: update/skills
|
|
UPDATE_COMMIT_MESSAGE: "update(skills): update skills-lock.json to latest versions"
|
|
UPDATE_PR_TITLE: "update(skills): update agent skills to latest versions"
|
|
UPDATE_PR_BODY: "Automated daily update of `skills-lock.json` via `npx skills update`."
|
|
UPDATE_BASE_BRANCH: main
|
|
run: bash scripts/github/open_update_pr.sh skills-lock.json
|