ci: self-hosted Renovate (NuGet CPM + Gitea Actions) #18

Merged
timothy merged 1 commits from chore/renovate-setup into main 2026-06-27 01:38:59 +02:00
2 changed files with 135 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
name: Renovate
# Self-hosted Renovate for the ErsatzTV fork (server-management#484).
#
# Opens dependency-update PRs against this repo (managers: nuget via CPM, github-actions).
# Runs on the shared Gitea act_runner (bumblebee). It supersedes the *proposing* half that
# the dependency-scan.yml (ersatztv#14) deliberately left out — that scan stays as a cheap
# in-repo detector for now.
#
# Config: repo-root renovate.json (package rules, grouping, automerge policy).
# Bot identity + tokens are injected from repo Actions secrets:
# RENOVATE_TOKEN — PAT of the dedicated `renovate` Gitea bot (write:repository,
# read:user, write:issue, read:organization)
# GITHUB_COM_TOKEN — no-scope github.com PAT for changelog/release-note fetching
# (Renovate needs this on non-GitHub platforms; optional, degrades
# gracefully to anonymous if unset)
#
# NOTE: Gitea runs `schedule` triggers ONLY from the default branch (main); this file must
# be on main before the cron registers. Use workflow_dispatch to run on demand — it defaults
# to a DRY RUN (logs only, no PRs); dispatch with "Dry run" cleared to create real PRs.
on:
workflow_dispatch:
inputs:
dryRun:
description: 'Dry run (full = log only, no PRs; clear for a live run)'
type: choice
options:
- 'full'
- ''
default: 'full'
logLevel:
description: 'Log level'
type: choice
options:
- 'info'
- 'debug'
default: 'info'
schedule:
# Mondays 03:00 UTC — ahead of the 06:00 vulnerability scan
- cron: '0 3 * * 1'
concurrency:
group: ersatztv-renovate
cancel-in-progress: false
jobs:
renovate:
name: Renovate
runs-on: ubuntu-latest
container:
image: renovate/renovate:41
steps:
- name: Run Renovate
env:
RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: http://192.168.1.95:3000/api/v1
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
RENOVATE_GITHUB_COM_TOKEN: ${{ secrets.GITHUB_COM_TOKEN }}
RENOVATE_REPOSITORIES: timothy/ersatztv
RENOVATE_AUTODISCOVER: 'false'
RENOVATE_GIT_AUTHOR: 'Renovate Bot <renovate@tblindustries.be>'
RENOVATE_DRY_RUN: ${{ inputs.dryRun }}
LOG_LEVEL: ${{ inputs.logLevel || 'info' }}
run: renovate
+70
View File
@@ -0,0 +1,70 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"timezone": "Europe/Brussels",
"semanticCommits": "enabled",
"dependencyDashboard": true,
"labels": ["dependencies"],
"enabledManagers": ["nuget", "github-actions"],
"osvVulnerabilityAlerts": true,
"vulnerabilityAlerts": {
"labels": ["dependencies", "security"]
},
"prConcurrentLimit": 5,
"packageRules": [
{
"description": "Group the Microsoft.Extensions.* family into one PR",
"matchPackageNames": ["/^Microsoft\\.Extensions\\./"],
"groupName": "Microsoft.Extensions"
},
{
"description": "Group the Microsoft.AspNetCore.* family into one PR",
"matchPackageNames": ["/^Microsoft\\.AspNetCore\\./"],
"groupName": "Microsoft.AspNetCore"
},
{
"description": "Group Entity Framework Core + providers (held to v9 by the range pins in Directory.Packages.props)",
"matchPackageNames": [
"/^Microsoft\\.EntityFrameworkCore/",
"/^EFCore\\.BulkExtensions/",
"/^Pomelo\\.EntityFrameworkCore/"
],
"groupName": "Entity Framework Core"
},
{
"description": "Group the Serilog family into one PR",
"matchPackageNames": ["/^Serilog/"],
"groupName": "Serilog"
},
{
"description": "Group the Refit family into one PR",
"matchPackageNames": ["/^Refit/"],
"groupName": "Refit"
},
{
"description": "Group the Lucene.Net family into one PR",
"matchPackageNames": ["/^Lucene\\.Net/"],
"groupName": "Lucene.Net"
},
{
"description": "Auto-merge patch bumps to test/dev-only packages once the build+test check passes; everything else stays manual (ersatztv is prod-bearing). server-management#484",
"matchPackageNames": [
"NUnit",
"NUnit.Analyzers",
"NUnit3TestAdapter",
"NSubstitute",
"Shouldly",
"coverlet.collector",
"Microsoft.NET.Test.Sdk",
"Testably.Abstractions",
"Testably.Abstractions.Testing",
"Microsoft.VisualStudio.Threading.Analyzers"
],
"matchUpdateTypes": ["patch"],
"automerge": true,
"platformAutomerge": true
}
]
}