Skip to content

Commit 702e005

Browse files
authored
Another renovate fix attempt, this time with more CI (#39)
* Fix Renovate v41 configuration errors Update configuration to be compatible with Renovate v41: - Change customManagers.fileMatch to managerFilePatterns - Change packageRules.description from strings to arrays The previous configuration used deprecated fields that caused validation errors with renovatebot/github-action@v43 (Renovate v41). Fixes errors: - "Custom Manager contains disallowed fields: fileMatch" - "Invalid configuration option: customManagers[0].fileMatch" - "Configuration option packageRules[x].description should be a list (Array)" Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: Colin Walters <[email protected]> * Add CI validation and fork support for Renovate workflow Ensure we run renovate in dry-run mode. Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: Colin Walters <[email protected]> --------- Signed-off-by: Colin Walters <[email protected]>
1 parent 486f806 commit 702e005

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

.github/workflows/renovate.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Renovate
22
on:
3+
pull_request:
34
workflow_dispatch:
45
inputs:
56
log-level:
@@ -13,11 +14,29 @@ on:
1314
schedule:
1415
- cron: '3 * * * *'
1516
jobs:
17+
validate:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
- name: Validate Renovate config
24+
uses: renovatebot/[email protected]
25+
env:
26+
RENOVATE_DRY_RUN: lookup
27+
LOG_LEVEL: debug
28+
with:
29+
configurationFile: renovate-config.js
30+
token: '${{ secrets.GITHUB_TOKEN }}'
31+
1632
renovate:
1733
runs-on: ubuntu-latest
34+
needs: validate
35+
if: github.event_name != 'pull_request'
1836
steps:
1937
- name: Generate Actions Token
2038
id: token
39+
if: github.repository_owner == 'bootc-dev'
2140
uses: actions/create-github-app-token@v2
2241
with:
2342
app-id: ${{ secrets.APP_ID }}
@@ -27,17 +46,11 @@ jobs:
2746
- name: Checkout
2847
uses: actions/checkout@v5
2948

30-
- name: Validate Renovate config
31-
run: |
32-
docker run --rm -v "$PWD:/repo" -w /repo \
33-
ghcr.io/renovatebot/renovate:41 \
34-
renovate-config-validator renovate-shared-config.json
35-
3649
- name: Self-hosted Renovate
3750
uses: renovatebot/[email protected]
3851
env:
39-
RENOVATE_DRY_RUN: ${{ github.event_name == 'pull_request' && 'full' }}
52+
RENOVATE_DRY_RUN: ${{ github.repository_owner != 'bootc-dev' && 'full' }}
4053
LOG_LEVEL: ${{ github.event.inputs.log-level || 'info' }}
4154
with:
4255
configurationFile: renovate-config.js
43-
token: '${{ steps.token.outputs.token }}'
56+
token: '${{ steps.token.outputs.token || secrets.GITHUB_TOKEN }}'

renovate-shared-config.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"customManagers": [
1919
{
2020
"customType": "regex",
21-
"fileMatch": ["(^|/)Containerfile$", "(^|/)Dockerfile$"],
21+
"managerFilePatterns": ["(^|/)Containerfile$", "(^|/)Dockerfile$"],
2222
"matchStrings": [
2323
"# renovate: datasource=(?<datasource>[a-z-]+) depName=(?<depName>[^\\s]+)\\s+ARG \\w+version=(?<currentValue>.+)"
2424
]
@@ -27,7 +27,7 @@
2727
"packageRules": [
2828
// Group GitHub Actions dependencies
2929
{
30-
"description": "GitHub Actions dependencies",
30+
"description": ["GitHub Actions dependencies"],
3131
"matchManagers": [
3232
"github-actions"
3333
],
@@ -36,7 +36,7 @@
3636
},
3737
// Group Rust dependencies
3838
{
39-
"description": "Rust dependencies",
39+
"description": ["Rust dependencies"],
4040
"matchManagers": [
4141
"cargo"
4242
],
@@ -45,7 +45,7 @@
4545
},
4646
// Group Docker dependencies
4747
{
48-
"description": "Docker dependencies",
48+
"description": ["Docker dependencies"],
4949
"matchManagers": [
5050
"dockerfile",
5151
"custom.regex"
@@ -55,7 +55,7 @@
5555
},
5656
// Disable Containerfile digest pinning
5757
{
58-
"description": "Containerfile digest pinning",
58+
"description": ["Containerfile digest pinning"],
5959
"matchManagers": [
6060
"dockerfile"
6161
],
@@ -66,7 +66,7 @@
6666
// This is due to there not being an easy way to tell Renovate which
6767
// Fedora version is "stable" and which has not been released yet.
6868
{
69-
"description": "Disable Fedora OCI updates",
69+
"description": ["Disable Fedora OCI updates"],
7070
"matchManagers": [
7171
"dockerfile",
7272
"github-actions"

0 commit comments

Comments
 (0)