Skip to content

Commit

Permalink
Add renovate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zoetrope committed Jul 4, 2023
1 parent 2b46ee5 commit 14c78af
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 2 additions & 1 deletion docs/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion e2e/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
106 changes: 106 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"username": "renovate[bot]",
"gitAuthor": "Renovate Bot <bot@renovateapp.com>",
"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": [
"- (?<currentValue>.+?) # renovate: kindest\\/node"
]
},
{
"datasourceTemplate": "docker",
"depNameTemplate": "kindest/node",
"fileMatch": [
"^e2e\\/Makefile$"
],
"matchStrings": [
"KUBERNETES_VERSION := (?<currentValue>.*?) # renovate: kindest\\/node"
]
}
]
}

0 comments on commit 14c78af

Please sign in to comment.