diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 94865b8..c67822b 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -23,39 +23,30 @@ concurrency: group: ${{ github.workflow }} cancel-in-progress: true -# Variables -env: - pr_set: '["bcgov/renovate-config", "bcgov/quickstart-openshift"]' - jobs: - Renovate: + run: + name: Dry-Run + env: + pr_set: bcgov/renovate-config bcgov/quickstart-openshift permissions: pull-requests: write runs-on: ubuntu-22.04 steps: - # workflow_dispatch - optional inputs - uses: actions/checkout@v4 - - name: Config for manual workflows (optional) + + # Run Renovate, dry run + - name: Renovate Dry-Run run: | - # Process and reformat inputs.repos - IFS=', ' read -a INPUT <<< "${{ inputs.repos }}" + # Process repo list and add to config + IFS=', ' read -a INPUT <<< "${{ inputs.repos || env.pr_set }}" for r in "${INPUT[@]}"; do REPOS+="\"$r\"," done REPOS=${REPOS%,*} - - # Set target repos cat <<< $(jq '. | .repositories = ['${REPOS}']' renovate.json) > renovate.json - cat renovate.json | jq .repositories - # PRs - dry run and a small number of repos - - name: Config for pull requests - if: github.event_name == 'pull_request' - run: | - # Dry run and short repo list + # Dry run cat <<< $(jq '.+= {"dryRun": "full"}' renovate.json) > renovate.json - cat <<< $(jq '. | .repositories = ${{ env.pr_set }}' renovate.json) > renovate.json - cat renovate.json | jq .repositories # Run Renovate - name: Run Renovate @@ -65,3 +56,15 @@ jobs: with: configurationFile: renovate.json token: ${{ secrets.RENOVATE_TOKEN }} + + validate: + name: Validate + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Validate Config + run: npx --yes --package renovate --- "renovate-config-validator --strict default.json renovate.json" diff --git a/default.json b/default.json index d92700d..522abc1 100644 --- a/default.json +++ b/default.json @@ -1,5 +1,8 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "automerge": true, + "configMigration": true, + "dependencyDashboard": true, "description": "Default preset for use with Renovate's repos", "extends": [ "config:recommended", @@ -26,18 +29,31 @@ ":semanticCommitScope(deps)" ], "forkProcessing": "enabled", - "onboarding": true, - "platform": "github", - "configMigration": true, - "dependencyDashboard": true, - "automerge": true, - "automergeType": "pr", - "platformAutomerge": true, - "prCreation": "not-pending", - "rebaseWhen": "behind-base-branch", + "ignorePresets": [ + ":ignoreModulesAndTests" + ], "minimumReleaseAge": "3 days", - "prConcurrentLimit": 5, + "onboarding": true, "packageRules": [ + { + "groupName": "github actions all dependencies", + "groupSlug": "github actions all", + "matchManagers": [ + "github-actions" + ], + "matchUpdateTypes": [ + "major", + "minor", + "patch", + "pin", + "pinDigest", + "digest", + "lockFileMaintenance", + "rollback", + "bump", + "replacement" + ] + }, { "description": "Py - group boto", "groupName": "boto", @@ -132,6 +148,8 @@ ] }, { + "groupName": "maven all non-major dependencies", + "groupSlug": "maven all-minor-patch", "matchManagers": [ "maven" ], @@ -139,28 +157,7 @@ "minor", "patch", "lockFileMaintenance" - ], - "groupName": "maven all non-major dependencies", - "groupSlug": "maven all-minor-patch" - }, - { - "matchManagers": [ - "github-actions" - ], - "matchUpdateTypes": [ - "major", - "minor", - "patch", - "pin", - "pinDigest", - "digest", - "lockFileMaintenance", - "rollback", - "bump", - "replacement" - ], - "groupName": "github actions all dependencies", - "groupSlug": "github actions all" + ] }, { "description": "JS - block eslint9", @@ -174,10 +171,7 @@ ] } ], - "ignorePresets": [ - ":ignoreModulesAndTests" - ], - "pre-commit": { - "pinDigests": false - } + "platform": "github", + "platformAutomerge": true, + "prConcurrentLimit": 5 } diff --git a/renovate.json b/renovate.json index 3d34f19..2eeebbd 100644 --- a/renovate.json +++ b/renovate.json @@ -3,6 +3,5 @@ "description": "Default preset for use with Renovate's repos", "extends": [ "github>bcgov/renovate-config" - ], - "repositories": [] + ] }