Skip to content

Commit

Permalink
Add renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
szinn committed Mar 15, 2024
1 parent c5692c8 commit 9142163
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.env
.env.*
!.env.example
.github

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
10 changes: 10 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>szinn/renovate-config"
],
"ignorePaths": [
"**/archive/**",
"**/*.sops.*"
]
}
70 changes: 70 additions & 0 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Renovate

on: # yamllint disable-line rule:truthy
workflow_dispatch:
inputs:
dryRun:
description: "Dry-Run"
default: "false"
required: false
logLevel:
description: "Log-Level"
default: "debug"
required: false
version:
description: Renovate version
default: latest
required: false
schedule:
- cron: "0 9,22 * * *"
push:
branches:
- main
paths:
- ".github/renovate.json5"
- ".github/renovate/**.json5"

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

env:
LOG_LEVEL: debug
DRY_RUN: false
RENOVATE_AUTODISCOVER: true
RENOVATE_AUTODISCOVER_FILTER: "${{ github.repository }}"
RENOVATE_DRY_RUN: "${{ inputs.dryRun == true }}"
RENOVATE_PLATFORM: github
RENOVATE_PLATFORM_COMMIT: true
WORKFLOW_RENOVATE_VERSION: "${{ inputs.version || 'latest' }}"

jobs:
renovate:
name: Renovate
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
with:
app_id: "${{ secrets.BOT_APP_ID }}"
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: "${{ steps.generate-token.outputs.token }}"

- name: Override default config from dispatch variables
run: |
echo "DRY_RUN=${{ github.event.inputs.dryRun || env.DRY_RUN }}" >> "${GITHUB_ENV}"
echo "LOG_LEVEL=${{ github.event.inputs.logLevel || env.LOG_LEVEL }}" >> "${GITHUB_ENV}"
- name: Renovate
uses: renovatebot/github-action@89bd050bafa5a15de5d9383e3129edf210422004 # v40.1.5
with:
configurationFile: .github/renovate.json5
token: "${{ steps.generate-token.outputs.token }}"
renovate-version: "${{ env.WORKFLOW_RENOVATE_VERSION }}"

0 comments on commit 9142163

Please sign in to comment.