Use self hosted renovate to keep dependencies up to date

This commit is contained in:
Christoph Petrausch
2022-08-30 10:10:11 +02:00
parent 1b7efee240
commit f1c023ed42
3 changed files with 77 additions and 0 deletions

27
.github/renovate.js vendored Normal file
View File

@@ -0,0 +1,27 @@
module.exports = {
branchPrefix: 'test-renovate/',
dryRun: true,
username: 'renovate-release',
gitAuthor: 'Renovate Bot <bot@renovateapp.com>',
onboarding: false,
platform: 'github',
includeForks: false,
repositories: [
'hikhvar/mqtt2prometheus',
],
packageRules: [
{
description: 'lockFileMaintenance',
matchUpdateTypes: [
'pin',
'digest',
'patch',
'minor',
'major',
'lockFileMaintenance',
],
dependencyDashboardApproval: false,
stabilityDays: 10,
},
],
};

25
.github/workflows/renovate.yaml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Renovate
on:
schedule:
# The "*" (#42, asterisk) character has special semantics in YAML, so this
# string has to be quoted.
- cron: '24 * * * *'
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Get token
id: get_token
uses: machine-learning-apps/actions-app-token@master
with:
APP_PEM: ${{ secrets.APP_PEM }}
APP_ID: ${{ secrets.APP_ID }}
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Self-hosted Renovate
uses: renovatebot/github-action@v32.118.0
with:
configurationFile: .github/renovate.js
token: 'x-access-token:${{ steps.get_token.outputs.app_token }}'

25
renovate.json Normal file
View File

@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":automergeRequireAllStatusChecks",
":separateMultipleMajorReleases",
":separatePatchReleases",
":renovatePrefix",
":semanticPrefixChore",
":prHourlyLimitNone",
":prConcurrentLimit10"
],
"automergeType": "pr",
"postUpdateOptions": [
"gomodTidy"
],
"labels": [
"dependencies",
"versions",
"automated"
],
"rebaseWhen": "behind-base-branch",
"stabilityDays": 10,
"internalChecksFilter": "strict"
}