diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 000000000..6fac140be --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>rancher/renovate-config#release" + ], + "baseBranchPatterns": [ + "main", + "release/v2.15", + "release/v2.14", + "release/v2.13", + "release/v2.12", + "release/v2.11" + ], + "prHourlyLimit": 2, + "packageRules": [ + { + "description": "Apply Rancher 2.15 update constraints to branch release/v2.15. Adapt baseBranchPatterns and matchBaseBranches if this repository uses different release branch names.", + "matchBaseBranches": [ + "release/v2.15" + ], + "extends": [ + "github>rancher/renovate-config//rancher-2.15#release" + ] + }, + { + "description": "Apply Rancher 2.14 update constraints to branch release/v2.14. Adapt baseBranchPatterns and matchBaseBranches if this repository uses different release branch names.", + "matchBaseBranches": [ + "release/v2.14" + ], + "extends": [ + "github>rancher/renovate-config//rancher-2.14#release" + ] + }, + { + "description": "Apply Rancher 2.13 update constraints to branch release/v2.13. Adapt baseBranchPatterns and matchBaseBranches if this repository uses different release branch names.", + "matchBaseBranches": [ + "release/v2.13" + ], + "extends": [ + "github>rancher/renovate-config//rancher-2.13#release" + ] + }, + { + "description": "Apply Rancher 2.12 update constraints to branch release/v2.12. Adapt baseBranchPatterns and matchBaseBranches if this repository uses different release branch names.", + "matchBaseBranches": [ + "release/v2.12" + ], + "extends": [ + "github>rancher/renovate-config//rancher-2.12#release" + ] + }, + { + "description": "Apply Rancher 2.11 update constraints to branch release/v2.11. Adapt baseBranchPatterns and matchBaseBranches if this repository uses different release branch names.", + "matchBaseBranches": [ + "release/v2.11" + ], + "extends": [ + "github>rancher/renovate-config//rancher-2.11#release" + ] + } + ] +} diff --git a/.github/workflows/renovate-vault.yml b/.github/workflows/renovate-vault.yml new file mode 100644 index 000000000..49376720f --- /dev/null +++ b/.github/workflows/renovate-vault.yml @@ -0,0 +1,57 @@ +name: Renovate +on: + workflow_dispatch: + inputs: + logLevel: + description: "Override default log level" + required: false + default: info + type: choice + options: + - info + - debug + overrideSchedule: + description: "Override all schedules" + required: false + default: "false" + type: choice + options: + - "false" + - "true" + configMigration: + description: "Toggle PRs for config migration" + required: false + default: "true" + type: choice + options: + - "false" + - "true" + renovateConfig: + description: "Define a custom renovate config file" + required: false + default: ".github/renovate.json" + type: string + minimumReleaseAge: + description: "Override minimumReleaseAge for a one-time run (e.g., '0 days' to disable delay)" + required: false + default: "null" + type: string + + schedule: + - cron: '30 4,6 * * 1-5' + +permissions: + contents: read + id-token: write + +jobs: + call-workflow: + uses: rancher/renovate-config/.github/workflows/renovate-vault.yml@922c8e762a46f551a064c44539923a3216b245be # v1.0.5 + with: + configMigration: ${{ inputs.configMigration || 'true' }} + logLevel: ${{ inputs.logLevel || 'info' }} + overrideSchedule: ${{ github.event.inputs.overrideSchedule == 'true' && '{''schedule'':null}' || '' }} + renovateConfig: ${{ inputs.renovateConfig || '.github/renovate.json' }} + minimumReleaseAge: ${{ inputs.minimumReleaseAge || 'null' }} + secrets: + override-token: "${{ secrets.RENOVATE_FORK_GH_TOKEN || '' }}"