Files
computer-playbook/.github/workflows/cron-update.yml
T
kevinveenbirkenbachandClaude Opus 5.5 739c78bad1 feat(update): bump addon pins through their declared source
The version-source updater only read meta/services.yml. An addon pinned in
meta/addons/<id>.yml stayed where it was: the ONLYOFFICE connector for
Nextcloud sat on v10.1.2, which does not install on Nextcloud 35, until
someone bumped it by hand.

The updater now reads addon files too. An addon declares its source in the
`update:` block it already has, beside monitored, catalog and upstream_id.
A monitored addon of the github-releases catalog needs nothing more: its
upstream_id names the repository whose tags are its versions. The
update-version-sources job opens the PRs, one per role.

Every pinned addon is wired:

- nextcloud onlyoffice carries its own version pin now. Its archive URL
  stays a literal that carries the pin, because
  test_pinned_addon_archives_available reads it as written
- wordpress mcp-adapter, moodle auth_oidc and jellyfin sso-authentication
  follow the tags of their repository, moodle within its v4.5 series
- the three xwiki extensions read their Maven metadata
- pretix-oidc reads the PyPI simple index. The JSON API answers 404 behind
  the package cache the test stack routes pypi.org through
- joomla's plugin is built here and jellyfin's ldap-authentication is bound
  to the md5 of its archive; both are opted out with that reason

A bump rewrites the pin and the config.archive line together, and an
archive that does not carry the pin fails test_version_keys, so the two
cannot drift apart again. test_version_pins_are_watched covers addon pins
as well: a new one without a source or a reasoned opt-out fails the lint.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 02:50:48 +02:00

255 lines
9.0 KiB
YAML

name: "🔄 Update versions"
run-name: "${{ github.event_name == 'schedule' && '⏰ ' || '' }}🔄 Update versions"
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * 6"
workflow_dispatch:
concurrency:
group: update-versions-${{ github.repository }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
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@v7.0.0
with:
ref: main
- name: 🔧 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: 📦 Install update dependencies
run: bash scripts/github/update/install_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/resolve/check_git_changes.sh roles
- name: ⚙️ Generate app token
if: steps.diff.outputs.changed == 'true'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.BOT_APP_CLIENT_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: 📂 Open PR if Docker image versions changed
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
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/update/open/role_prs.sh roles
update-version-sources:
name: 🔖 Update declared version sources
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
with:
ref: main
- name: 🔧 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: 📦 Install update dependencies
run: bash scripts/github/update/install_python.sh
- name: 🔄 Update declared version sources
run: bash scripts/github/update/version_sources.sh
- name: 🔎 Check for changes
id: diff
run: bash scripts/github/resolve/check_git_changes.sh roles
- name: ⚙️ Generate app token
if: steps.diff.outputs.changed == 'true'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.BOT_APP_CLIENT_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: 📂 Open PR if declared version sources changed
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
UPDATE_BRANCH_PREFIX: update/version-sources
UPDATE_COMMIT_MESSAGE: "update(versions): update pins with a declared source"
UPDATE_PR_TITLE: "update(versions): update pins with a declared source"
UPDATE_PR_BODY: "Automated update of version pins declaring their upstream in an `update:` block of `roles/*/meta/services.yml` or `roles/*/meta/addons/*.yml`."
UPDATE_BASE_BRANCH: main
run: bash scripts/github/update/open/role_prs.sh roles
update-pip-pins:
name: 🐍 Update pinned pip requirements
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
with:
ref: main
- name: 🔧 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: 📦 Install update dependencies
run: bash scripts/github/update/install_python.sh
- name: 🔄 Update pinned pip requirements
run: bash scripts/github/update/pip_pins.sh
- name: 🔎 Check for changes
id: diff
run: bash scripts/github/resolve/check_git_changes.sh roles
- name: ⚙️ Generate app token
if: steps.diff.outputs.changed == 'true'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.BOT_APP_CLIENT_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: 📂 Open PR if pip pins changed
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
UPDATE_BRANCH_PREFIX: update/pip-pins
UPDATE_COMMIT_MESSAGE: "update(pip): update pinned pip requirements"
UPDATE_PR_TITLE: "update(pip): update pinned pip requirements"
UPDATE_PR_BODY: "Automated update of exact pip pins in `roles/**/*.yml`."
UPDATE_BASE_BRANCH: main
run: bash scripts/github/update/open/role_prs.sh roles
update-galaxy-pins:
name: 🌌 Update pinned Ansible collections
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
with:
ref: main
- name: 🔧 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: 📦 Install update dependencies
run: bash scripts/github/update/install_python.sh
- name: 🔄 Update pinned Ansible collections
run: bash scripts/github/update/galaxy_pins.sh
- name: 🔎 Check for changes
id: diff
run: bash scripts/github/resolve/check_git_changes.sh requirements
- name: ⚙️ Generate app token
if: steps.diff.outputs.changed == 'true'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.BOT_APP_CLIENT_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: 📂 Open PR if collection pins changed
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
UPDATE_BRANCH_PREFIX: update/galaxy-pins
UPDATE_COMMIT_MESSAGE: "update(galaxy): bump pinned Ansible collections"
UPDATE_PR_TITLE: "update(galaxy): bump pinned Ansible collections"
UPDATE_PR_BODY: "Automated update of the collection `version:` pins in `requirements/`. Both the Galaxy file and the git fallback are bumped together; upstream releases resolved via `git ls-remote --tags`."
UPDATE_BASE_BRANCH: main
run: bash scripts/github/update/open/pr.sh requirements
update-repository-refs:
name: 🌿 Update repository refs
if: vars.CI_ENABLE_AUTO_UPDATES == 'true'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v7.0.0
with:
ref: main
- name: 🔧 Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: 📦 Install update dependencies
run: bash scripts/github/update/install_python.sh
- name: 🔄 Update repository refs
run: bash scripts/github/update/repository_refs.sh
- name: 🔎 Check for changes
id: diff
run: bash scripts/github/resolve/check_git_changes.sh roles
- name: ⚙️ Generate app token
if: steps.diff.outputs.changed == 'true'
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ secrets.BOT_APP_CLIENT_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: 📂 Open PR if repository refs changed
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
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/update/open/role_prs.sh roles