From 623e1e75e9fea7a65d54a3ef59ddf139cbb3ea55 Mon Sep 17 00:00:00 2001 From: Simon <443781544@qq.com> Date: Tue, 25 Oct 2022 16:35:21 -0400 Subject: [PATCH] Add Renovate (#273) Co-authored-by: Jiayuan Chen --- .github/dependabot.yml | 19 ------------------- .github/workflows/lint.yml | 12 ++++++++++++ renovate.json | 27 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 19 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/lint.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index a5fb308..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,19 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "daily" - - package-ecosystem: "docker" - directory: "/docker" - schedule: - interval: "daily" - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..593f356 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +name: Renovate Config Linting +on: [pull_request] + +jobs: + renovate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: 🧼 lint renovate config # Validates changes to renovate.json config file + uses: suzuki-shunsuke/github-action-renovate-config-validator@v0.1.2 + with: + config_file_path: 'renovate.json' diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..12c4c93 --- /dev/null +++ b/renovate.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "description": "Renovate configuration for pygitops", + "labels": [ + "renovate/{{depName}}" + ], + "extends": [ + "config:base" + ], + "schedule": [ + "before 9am" + ], + "packageRules": [ + { + "matchManagers": ["dockerfile", "docker-compose"], + "groupName": "Docker" + }, + { + "matchManagers": ["github-actions"], + "groupName": "GitHub Actions" + }, + { + "matchManagers": ["pip_requirements", "pip_setup", "setup-cfg"], + "groupName": "Python" + } + ] +}