diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f45acda..d0822ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,9 +36,9 @@ jobs: strategy: matrix: k8s-version: - - v1.25.11 - - v1.26.6 - - v1.27.3 + - v1.25.11 # renovate: kindest/node + - v1.26.6 # renovate: kindest/node + - v1.27.3 # renovate: kindest/node runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml new file mode 100644 index 0000000..85d3a98 --- /dev/null +++ b/.github/workflows/renovate.yaml @@ -0,0 +1,15 @@ +name: Renovate +on: + schedule: + - cron: '0 10 * * 1' +jobs: + renovate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Self-hosted Renovate + uses: renovatebot/github-action@2a87d1192eaa0cac92b6566233afedf68fd3472a # renovate v38.1.8 + with: + configurationFile: renovate.json + token: ${{ secrets.RENOVATE_TOKEN }} diff --git a/docs/maintenance.md b/docs/maintenance.md index 0e592a8..d0bdc10 100644 --- a/docs/maintenance.md +++ b/docs/maintenance.md @@ -13,4 +13,5 @@ If Kubernetes or controller-runtime API has changed, please fix the relevant sou ## How to update dependencies -TBD. +Renovate will create PRs that update dependencies once a week. +However, Kubernetes is only updated with patched versions. diff --git a/e2e/Makefile b/e2e/Makefile index dec6f97..60b1c1f 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -1,4 +1,4 @@ -KUBERNETES_VERSION = v1.27.3 +KUBERNETES_VERSION = v1.27.3 # renovate: kindest/node KUBECTL_ACCURATE := $(dir $(shell pwd))/bin/kubectl-accurate KUBECONFIG := $(shell pwd)/.kubeconfig diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5b23a3a --- /dev/null +++ b/renovate.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "username": "renovate[bot]", + "gitAuthor": "Renovate Bot ", + "platform": "github", + "onboarding": false, + "repositories": [ + "cybozu-go/accurate" + ], + "extends": [ + "config:base", + "github>aquaproj/aqua-renovate-config#1.6.0", + ":semanticCommitTypeAll(chore)", + ":timezone(Asia/Tokyo)" + ], + "ignorePresets": [":prHourlyLimit2"], + "labels": [ + "dependencies" + ], + "packageRules": [ + { + "description": "Separate minor and patch updates for Kubernetes packages", + "matchDatasources": [ + "go" + ], + "matchPackagePatterns": [ + "^k8s\\.io\\/.*" + ], + "separateMinorPatch": true + }, + { + "description": "Disable major updates for k8s.io/client-go", + "enabled": false, + "matchDatasources": [ + "go" + ], + "matchPackageNames": [ + "k8s.io/client-go" + ], + "matchUpdateTypes": [ + "major" + ] + }, + { + "description": "Separate minor and patch updates for kubectl", + "matchPackageNames": [ + "kubernetes/kubectl" + ], + "separateMinorPatch": true + }, + { + "description": "Disable major and minor update for kubectl", + "enabled": false, + "matchPackageNames": [ + "kubernetes/kubectl" + ], + "matchUpdateTypes": [ + "major", + "minor" + ] + }, + { + "description": "Separate minor and patch update for Kubernetes", + "matchPackageNames": [ + "kindest/node" + ], + "separateMinorPatch": true + }, + { + "description": "Disable major and minor update for Kubernetes", + "enabled": false, + "matchPackageNames": [ + "kindest/node" + ], + "matchUpdateTypes": [ + "major", + "minor" + ] + } + ], + "postUpdateOptions": [ + "gomodTidy" + ], + "regexManagers": [ + { + "datasourceTemplate": "docker", + "depNameTemplate": "kindest/node", + "fileMatch": [ + "^\\.github\\/workflows\\/.+\\.ya?ml$" + ], + "matchStrings": [ + "- (?.+?) # renovate: kindest\\/node" + ] + }, + { + "datasourceTemplate": "docker", + "depNameTemplate": "kindest/node", + "fileMatch": [ + "^e2e\\/Makefile$" + ], + "matchStrings": [ + "KUBERNETES_VERSION := (?.*?) # renovate: kindest\\/node" + ] + } + ] +}