mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 12:47:04 +00:00
Move files that share a delimiter-bounded name prefix within a folder (threshold 2) into a subfolder named after the prefix, dropping the prefix from the filename. Covers plugins/filter (docker, generate, has, merge, get/all), env handler subpackages, utils/roles/entity, utils/tests/swarm/write, role SQL/scripts/templates, keycloak/mailu task-includes, shared tasks/utils/load, and CI scripts. Update every import, query_file/script/include_tasks/src/lookup target, compose bind mount, and python -m path to the new locations. Extend the prefix-grouped-files lint to threshold 2 with dir-level .nocheck and file-head nocheck opt-outs, and skip groups whose shortest member's stem equals the shared prefix. Keep flat only where a loader forbids nesting: WordPress mu-plugins and the docs/requirements namespace. Ansible filter discovery is recursive, so nested filters stay Jinja-resolvable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
109 lines
3.6 KiB
YAML
109 lines
3.6 KiB
YAML
name: "🔄 Update: Versions"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: "0 0 * * 6"
|
|
workflow_dispatch:
|
|
|
|
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-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
|