From b31758e23dac7966dea1b2c5334fbc31684fb976 Mon Sep 17 00:00:00 2001 From: cesnimda Date: Thu, 2 Jul 2026 16:20:50 +0200 Subject: [PATCH] feat(ci): Renovate automated dependency updates (RECOMMENDATIONS #2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Weekly Renovate run against this Gitea instance: grouped minor/patch PRs per ecosystem, individually-reviewed majors (dashboard approval), immediate security-alert PRs. All update PRs ride the existing required CI gates (build/tests/gitleaks/vuln/live-db/format), so merging one is as safe as any other PR. ONE MANUAL STEP remains: create a Gitea PAT (repo rw, user r, issue rw, org r) and add it as the RENOVATE_TOKEN Actions secret — the workflow fails fast with instructions until then. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/renovate.yml | 35 +++++++++++++++++++++++++++++++++++ renovate.json | 27 +++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .gitea/workflows/renovate.yml create mode 100644 renovate.json diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml new file mode 100644 index 0000000..7e53277 --- /dev/null +++ b/.gitea/workflows/renovate.yml @@ -0,0 +1,35 @@ +name: Renovate + +# RECOMMENDATIONS #2: automated dependency-update PRs (NuGet, npm, Dockerfiles, Actions) +# that ride the existing required CI gates. Runs weekly + on demand. +# +# ONE-TIME SETUP (manual): create a Gitea personal access token with scopes +# repo (rw) + user (r) + issue (rw) + organization (r), and add it as the Actions +# secret RENOVATE_TOKEN (repo Settings -> Actions -> Secrets). Without the secret this +# workflow fails fast with a clear message. See https://docs.renovatebot.com/modules/platform/gitea/ +on: + schedule: + - cron: '30 4 * * 1' # Mondays 04:30 UTC + workflow_dispatch: {} + +jobs: + renovate: + runs-on: ubuntu-latest + steps: + - name: Require RENOVATE_TOKEN + run: | + if [ -z "${{ secrets.RENOVATE_TOKEN }}" ]; then + echo "RENOVATE_TOKEN secret is not set — see the comment at the top of this workflow." >&2 + exit 1 + fi + - name: Run Renovate + uses: https://github.com/renovatebot/github-action@v40.3.6 + with: + token: ${{ secrets.RENOVATE_TOKEN }} + env: + RENOVATE_PLATFORM: gitea + RENOVATE_ENDPOINT: https://git.cesnimda.uk/api/v1 + RENOVATE_REPOSITORIES: cesnimda/Inboxintel + RENOVATE_ONBOARDING: "false" + RENOVATE_REQUIRE_CONFIG: optional + LOG_LEVEL: info diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..080fe3d --- /dev/null +++ b/renovate.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "timezone": "Europe/Berlin", + "schedule": ["before 6am on monday"], + "labels": ["dependencies"], + "prConcurrentLimit": 5, + "commitMessagePrefix": "chore(deps):", + "packageRules": [ + { + "description": "Group safe minor+patch updates into one weekly PR per ecosystem", + "matchUpdateTypes": ["minor", "patch"], + "groupName": "{{manager}} minor & patch" + }, + { + "description": "Major updates stay individual PRs for careful review", + "matchUpdateTypes": ["major"], + "dependencyDashboardApproval": true + } + ], + "vulnerabilityAlerts": { + "enabled": true, + "labels": ["security"], + "schedule": ["at any time"] + }, + "ignorePaths": ["**/node_modules/**", "**/bin/**", "**/obj/**"] +}