Skip to content
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
36 changes: 36 additions & 0 deletions .github/workflows/renovate-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Validate Renovate preset

on:
pull_request:
paths:
- renovate-config.json
- .github/workflows/renovate-config.yml
push:
branches: [main]
paths:
- renovate-config.json
- .github/workflows/renovate-config.yml

permissions: {}

jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
# Every DIRACGrid repo extends this file: a broken preset breaks Renovate everywhere at once.
# Copied to renovate.json so it is checked as repository config, which is how repos consume it
# (given an arbitrary file name, the validator checks it as global config instead).
- name: Validate renovate-config.json
run: |
mkdir "$RUNNER_TEMP/preset"
cp renovate-config.json "$RUNNER_TEMP/preset/renovate.json"
cd "$RUNNER_TEMP/preset"
npx --yes --package renovate@44.243.0 -- renovate-config-validator --strict
37 changes: 37 additions & 0 deletions renovate-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": [
"DIRACGrid default Renovate policy.",
"Adopt with: {\"extends\": [\"local>DIRACGrid/.github//renovate-config\"]}.",
"Repos with maintained release branches also set baseBranchPatterns, e.g. [\"$default\", \"/^rel-/\"]."
],
"extends": [
"config:recommended",
"helpers:pinGitHubActionDigests",
":configMigration"
],
"labels": ["dependencies"],
"minimumReleaseAge": "7 days",
"lockFileMaintenance": {
"enabled": true
},
"packageRules": [
{
"description": "Do not hold back our own Actions, reusable workflows and images: the cooldown is for third-party code, and our refs pinned to a branch (e.g. `@<sha> # main`) have no release timestamp, so the cooldown would block their digest updates forever.",
"matchPackageNames": ["DIRACGrid/**", "ghcr.io/diracgrid/**"],
"minimumReleaseAge": null
},
{
"description": "Group all GitHub Actions updates together.",
"matchManagers": ["github-actions"],
"groupName": "GitHub Actions",
"addLabels": ["github-actions"]
},
{
"description": "Lock file maintenance re-resolves everything to the newest version and skips minimumReleaseAge, so only the package manager can enforce a cooldown. pixi does it with `exclude-newer = \"7d\"` in pixi.toml / [tool.pixi.workspace] (set it in every pixi repo); npm has no rolling equivalent, so its lock files are not refreshed blindly.",
"matchManagers": ["npm"],
"matchUpdateTypes": ["lockFileMaintenance"],
"enabled": false
}
]
}
Loading