ci(renovate): run Renovate from a cron workflow on the kamino-runner
Add .gitea/workflows/renovate.yml (daily 03:17 UTC and workflow_dispatch with a dry_run choice), using the job token and a digest-pinned renovate/renovate container, so no Kamino code runs in the production cluster. renovate.json runs scripts/bump_image_versions.py origin/main as a postUpgradeTasks command for the image inputs, and the workflow's own container pin is excluded from bot bumps. Document the dry run, the unverified points and the open decision on CI triggering for job-token pull requests. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
This commit is contained in:
1 parent
e8ae9dcbcb
commit
7730440759
4 files changed
+128
-20
No files matched your search
@@ -0,0 +1,64 @@
|
||||
name: Renovate
|
||||
|
||||
# Dependency updates for this repository (renovate.json). Runs on the Collection's own runner
|
||||
# (label kamino-docker, the untrusted side), never in the production cluster: code from this
|
||||
# repository must not run there. The only credential is the job token (secrets.GITHUB_TOKEN);
|
||||
# no org secret is referenced (only image.yml may). Unauthenticated GitHub lookups for the
|
||||
# github.com pre-commit hooks may hit rate limits: best effort, no RENOVATE_GITHUB_COM_TOKEN exists.
|
||||
#
|
||||
# Dry run: Actions > Renovate > Run workflow, dry_run=true (the default for a manual run), then
|
||||
# read the debug log. The schedule runs live.
|
||||
on: # yamllint disable-line rule:truthy
|
||||
schedule:
|
||||
# Daily, off the hour so it avoids typical molecule and image runs.
|
||||
- cron: "17 3 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: "Log what Renovate would do without branches or pull requests"
|
||||
type: choice
|
||||
options:
|
||||
- "true"
|
||||
- "false"
|
||||
default: "true"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
# Never two runs at once; a running one is not cancelled (it may be mid-push).
|
||||
concurrency:
|
||||
group: renovate
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
# Only in this repository (a copy elsewhere would run with its own job token).
|
||||
if: github.repository == 'mortis/kamino' || github.repository == 'Mortis/Kamino'
|
||||
runs-on: kamino-docker
|
||||
timeout-minutes: 30
|
||||
# Docker Hub image, pinned by digest like the cluster's CronJob (same version). The -full
|
||||
# flavour ships python3 for the postUpgradeTasks command. Hand-bumped: renovate.json
|
||||
# disables updates for this file.
|
||||
container:
|
||||
image: renovate/renovate:44.161.0-full@sha256:ddbf02e44b542343c9df696b88fd953f04cc3ee5f771221805ff8efb26595416
|
||||
steps:
|
||||
- name: Run Renovate
|
||||
env:
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_ENDPOINT: ${{ github.server_url }}/api/v1/
|
||||
RENOVATE_REPOSITORIES: ${{ github.repository }}
|
||||
RENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RENOVATE_GIT_AUTHOR: "Renovate Bot <[email protected]>"
|
||||
RENOVATE_BINARY_SOURCE: install
|
||||
# postUpgradeTasks may run exactly this one command (anchored, no wildcard); the JSON
|
||||
# string holds a regex, hence the doubled backslash.
|
||||
RENOVATE_ALLOWED_COMMANDS: '["^python3 scripts/bump_image_versions\\.py origin/main$"]'
|
||||
LOG_LEVEL: ${{ github.event_name == 'workflow_dispatch' && 'debug' || 'info' }}
|
||||
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'false' }}
|
||||
run: |
|
||||
if [ "$DRY_RUN" = "true" ]; then
|
||||
export RENOVATE_DRY_RUN=full
|
||||
fi
|
||||
renovate
|
||||
Reference in new issue
Block a user