Skip to content

Commit 18b4d53

Browse files
authored
Add Renovate configuration and workflow for automated dependency management (#30)
1 parent cd1b447 commit 18b4d53

2 files changed

Lines changed: 90 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Tools - Renovate
3+
4+
"on":
5+
schedule:
6+
- cron: "0 5 * * 6" # Jeden Samstag um 06:00 Uhr
7+
workflow_dispatch:
8+
inputs:
9+
logLevel:
10+
type: choice
11+
required: false
12+
options:
13+
- info
14+
- debug
15+
default: "info"
16+
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
issues: write
22+
23+
24+
jobs:
25+
renovate:
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Generate app token
30+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
31+
id: generate-token
32+
with:
33+
client-id: ${{ secrets.GH_APP_RDP_ID }}
34+
private-key: ${{ secrets.GH_APP_RDP_PRIVATE_KEY }}
35+
36+
- name: Run Renovate
37+
uses: renovatebot/github-action@693b9ef15eec82123529a37c782242f091365961 # v46.1.14
38+
with:
39+
token: ${{ steps.generate-token.outputs.token }}
40+
# token: ${{ secrets.GH_TOKEN }}
41+
env:
42+
LOG_LEVEL: ${{ inputs.logLevel || 'info' }}
43+
# Repository taken from variable to keep configuration file generic
44+
RENOVATE_REPOSITORIES: ${{ github.repository }}
45+
# This flag will stop renovate from trying to create an onboarding PR, instead it will look for renovate.json file and run
46+
RENOVATE_ONBOARDING: "false"
47+
RENOVATE_DEPENDENCY_DASHBOARD_AUTOCLOSE: "true"
48+
RENOVATE_DEPENDENCY_DASHBOARD_TITLE: "Renovate Dependency Dashboard"

renovate.json5

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: [
4+
'config:recommended',
5+
'helpers:pinGitHubActionDigests',
6+
],
7+
commitMessagePrefix: 'chore(deps):',
8+
timezone: 'Europe/Berlin',
9+
prHourlyLimit: 0,
10+
prConcurrentLimit: 0,
11+
automerge: false,
12+
minimumReleaseAge: '7 days',
13+
minimumReleaseAgeBehaviour: 'timestamp-required',
14+
internalChecksFilter: 'strict',
15+
enabledManagers: [
16+
'github-actions',
17+
],
18+
19+
20+
packageRules: [
21+
{
22+
// ===========================================================================
23+
// GitHub Actions
24+
// ===========================================================================
25+
matchManagers: [
26+
'github-actions',
27+
],
28+
matchPackageNames: [
29+
'*',
30+
],
31+
labels: [
32+
'dependencies',
33+
'github_actions',
34+
],
35+
draftPR: true,
36+
additionalBranchPrefix: 'github_action/',
37+
branchTopic: '{{depNameSanitized}}-{{#if newVersion}}{{newVersion}}{{else}}{{currentValue}}-{{newDigest}}{{/if}}',
38+
commitMessageTopic: '{{depName}}',
39+
commitMessageExtra: '{{#if newVersion}}from {{currentVersion}} to {{newVersion}}{{else}}{{newValue}} from {{currentDigestShort}} to {{newDigestShort}}{{/if}}',
40+
},
41+
],
42+
}

0 commit comments

Comments
 (0)