From c12f5ca4362b2adf2b44e574ab8b82675b9423f9 Mon Sep 17 00:00:00 2001 From: Matthias Vach Date: Wed, 30 Apr 2025 14:46:14 +0200 Subject: [PATCH] Add renovate config Co-authored-by: Nicolas Bender --- .github/dependabot.yml | 23 --------------- .github/workflows/renovate.yml | 18 ++++++++++++ renovate.json | 54 ++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 23 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/renovate.yml create mode 100644 renovate.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index bf99f0e3..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -version: 2 -updates: -- package-ecosystem: gomod - directory: "/" - schedule: - interval: daily - allow: - # Allow both direct and indirect updates for all packages - - dependency-type: "all" - # group all minor and patch dependency updates together - groups: - go-modules: - patterns: - - "*" - update-types: - - "minor" - - "patch" - exclude-patterns: - - "github.com/anchore/stereoscope" - - "github.com/testcontainers/testcontainers-go" - - "github.com/docker/docker" - - "github.com/containerd/containerd" diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 00000000..5fe48b1b --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,18 @@ +name: Renovate + +on: + workflow_dispatch: + inputs: + version: + description: 'Renovate updates dependencies' + required: false +jobs: + renovate: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Self-hosted Renovate + uses: renovatebot/github-action@v41.0.22 + with: + token: ${{ secrets.RENOVATE_TOKEN }} \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..080ee77a --- /dev/null +++ b/renovate.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [":gomod"], + "github-actions": { + "enabled": false + }, + "npm": { + "enabled": false + }, + "postUpdateOptions": [ + "gomodUpdateImportPaths", + "gomodTidy" + ], + "env": { + "GOSUMDB": "sum.golang.org" + }, + "packageRules": [ + { + "groupName": "all non-major Go dependencies", + "groupSlug": "all-minor-patch", + "matchPackageNames": [ + "!github.com/anchore/stereoscope", + "!github.com/testcontainers/testcontainers-go", + "!github.com/docker/docker", + "!github.com/containerd/containerd" + ], + "matchUpdateTypes": ["minor", "patch"], + "matchManagers": ["gomod"] + } + ], + "customManagers": [ + { + "customType": "regex", + "fileMatch": [ + "^buildpack.toml$" + ], + "matchStrings": [ + "id = \"(?.*?)\"\\s*.*\\s+version = \"(?\\d+?\\.\\d+?\\.\\d+?)\"" + ], + "datasourceTemplate": "github-releases", + "extractVersionTemplate": "^v?(?.*)$" + }, + { + "customType": "regex", + "fileMatch": [ + "^package.toml$" + ], + "matchStrings": [ + "uri\\s*=\\s*\"urn:cnb:registry:(?.*?)?(:|@)(?\\d+?\\.\\d+?\\.\\d+?)\"" + ], + "datasourceTemplate": "buildpacks-registry" + } + ] + } \ No newline at end of file