Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scheduled RenovateBot workflow for Copier #12

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/renovate-global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends":
[
"customManagers:githubActionsVersions"
],
"platform": "github",
"onboarding": false,
"requireConfig": "ignored",
"enabledManagers":
[
"copier",
"custom.regex"
],
"allowScripts": true,
"ignoreScripts": false,
"autodiscover": true,
"platformCommit": true,
"constraints":
{
"copier": ">=9.3",
"python": "3.10"
}
}
44 changes: 44 additions & 0 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Update Copier template

on:
workflow_dispatch:
inputs:
repoFilter:
description: >
Filter the repositories Renovate runs against.
Can be regex or minimatch glob-style.
See https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter
required: false
default: 'salt-extensions/*'
type: string
schedule:
- cron: '23 4 * * *'

env:
# renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
RENOVATE_VERSION: 38.94.2

jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Get token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GHA_RENOVATE_APP_ID }}
private-key: ${{ secrets.GHA_RENOVATE_PK }}
owner: ${{ github.repository_owner }}

- name: Checkout
uses: actions/[email protected]

- name: Self-hosted Renovate
uses: renovatebot/[email protected]
with:
configurationFile: .github/renovate-global.json
renovate-version: ${{ env.RENOVATE_VERSION }}
token: ${{ steps.app-token.outputs.token }}
env:
RENOVATE_AUTODISCOVER_FILTER: ${{ github.event_name == 'workflow_dispatch' && inputs.repoFilter || 'salt-extensions/*' }}