Skip to content

Commit a18f3d7

Browse files
committed
Manual self-upgrade
Signed-off-by: Erik Godding Boye <[email protected]>
1 parent 96a5571 commit a18f3d7

File tree

8 files changed

+246
-65
lines changed

8 files changed

+246
-65
lines changed

.github/dependabot.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@
44
# Update Go dependencies and GitHub Actions dependencies daily.
55
version: 2
66
updates:
7-
- package-ecosystem: gomod
8-
directory: /
9-
schedule:
10-
interval: daily
11-
groups:
12-
all-go-deps:
13-
patterns: ["*"]
147
- package-ecosystem: github-actions
158
directory: /
169
schedule:
1710
interval: daily
1811
exclude-paths: # Exclude files that are mastered from makefile-modules and shouldn't be upgraded in projects using makefile-modules.
1912
- .github/workflows/govulncheck.yaml
2013
- .github/workflows/make-self-upgrade.yaml
14+
- .github/workflows/renovate.yaml
2115
groups:
2216
all-gh-actions:
2317
patterns: ["*"]

.github/renovate.json5

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
// Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/renovate.json5 instead.
3+
14
{
25
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
36
enabled: true,
7+
enabledManagers: [
8+
'gomod',
9+
],
10+
separateMajorMinor: false,
411
extends: [
512
'config:best-practices',
613
':gitSignOff',
@@ -12,9 +19,8 @@
1219
timezone: 'Europe/London',
1320
labels: [
1421
'dependencies',
15-
],
16-
allowedCommands: [
17-
'make generate',
22+
'kind/cleanup',
23+
'release-note-none',
1824
],
1925
postUpgradeTasks: {
2026
commands: [
@@ -23,81 +29,62 @@
2329
executionMode: 'branch',
2430
},
2531
packageRules: [
26-
// Currently, there seems to be issues with permissions which doesn't allow Renovate to update actions.
2732
{
28-
groupName: 'GitHub Actions',
33+
groupName: 'Misc Go deps',
2934
matchManagers: [
30-
'github-actions',
35+
'gomod',
3136
],
3237
matchPackageNames: [
33-
'/.*/',
38+
'*',
3439
],
3540
},
3641
{
37-
groupName: 'Misc Go deps',
42+
groupName: 'Kubernetes Go deps',
3843
matchManagers: [
3944
'gomod',
4045
],
4146
matchPackageNames: [
42-
'/.*/',
47+
'sigs.k8s.io**/**',
48+
'k8s.io**/**',
4349
],
4450
},
4551
{
46-
groupName: 'Kubernetes Go deps',
52+
groupName: 'Cloud Go deps',
4753
matchManagers: [
4854
'gomod',
4955
],
5056
matchPackageNames: [
51-
'/^sigs.k8s.io/',
52-
'/^k8s.io/',
57+
'github.com/akamai**/**',
58+
'github.com/aws**/**',
59+
'github.com/Azure**/**',
60+
'github.com/AzureAD**/**',
61+
'github.com/cloudflare**/**',
62+
'github.com/digitalocean**/**',
63+
'google.golang.org/api',
5364
],
5465
},
5566
{
56-
groupName: 'Cloud Go deps',
67+
groupName: 'golang.org/x deps',
5768
matchManagers: [
5869
'gomod',
5970
],
6071
matchPackageNames: [
61-
'/^github.com/Azure/',
62-
'/^github.com/AzureAD/',
63-
'/^github.com/aws/',
72+
'golang.org/x**/*',
73+
],
74+
addLabels: [
75+
'skip-review', // Adding label to allow PRs to automerge
6476
],
6577
},
6678
{
67-
description: 'Disable all cert-manager related dependencies',
79+
description: 'Disable Go pseudo-version updates',
6880
matchManagers: [
6981
'gomod',
7082
],
7183
matchPackageNames: [
72-
'/^github.com/cert-manager/',
84+
'*',
7385
],
74-
allowedVersions: '!/0.0.0/',
86+
matchCurrentValue: 'v0.0.0*',
7587
enabled: false,
7688
},
7789
],
78-
ignorePaths: [
79-
'**/vendor/**',
80-
'**/node_modules/**',
81-
'**/__tests__/**',
82-
// The following files are managed from makefile-modules, and should be ignored by Renovate in other projects.
83-
'.github/workflows/govulncheck.yaml',
84-
'.github/workflows/make-self-upgrade.yaml',
85-
'.github/dependabot.yaml',
86-
],
87-
prBodyDefinitions: {
88-
Package: '{{depName}}',
89-
},
90-
prBodyColumns: [
91-
'Package',
92-
'Type',
93-
'Update',
94-
'Change',
95-
'References',
96-
],
97-
prBodyNotes: [
98-
'/kind cleanup',
99-
'### Release Note\n```release-note\nNONE\n```',
100-
'**Note**: This PR was automatically created by Renovate Bot.',
101-
'',
102-
],
10390
}

.github/workflows/renovate.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/workflows/renovate.yaml instead.
3+
4+
name: Renovate
5+
on:
6+
workflow_dispatch: {}
7+
schedule:
8+
- cron: '0 2 * * *'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
renovate:
15+
runs-on: ubuntu-latest
16+
17+
if: github.repository == 'cert-manager/webhook-cert-lib'
18+
19+
permissions:
20+
contents: write
21+
issues: write
22+
statuses: write
23+
pull-requests: write
24+
25+
steps:
26+
- name: Fail if branch is not head of branch.
27+
if: ${{ !startsWith(github.ref, 'refs/heads/') && env.SOURCE_BRANCH != '' && env.SELF_UPGRADE_BRANCH != '' }}
28+
run: |
29+
echo "This workflow should not be run on a non-branch-head."
30+
exit 1
31+
32+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33+
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
34+
# the tags so `git describe` returns a valid version.
35+
# see https://github.com/actions/checkout/issues/701 for extra info about this option
36+
with: { fetch-depth: 0 }
37+
38+
- id: go-version
39+
run: |
40+
make print-go-version >> "$GITHUB_OUTPUT"
41+
42+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
43+
with:
44+
go-version: ${{ steps.go-version.outputs.result }}
45+
46+
- name: Self-hosted Renovate
47+
uses: renovatebot/github-action@b11417b9eaac3145fe9a8544cee66503724e32b6 # v43.0.8
48+
with:
49+
configurationFile: .github/renovate.json5
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
env:
52+
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'
53+
RENOVATE_ONBOARDING: "false"
54+
RENOVATE_PLATFORM: "github"
55+
LOG_LEVEL: "debug"
56+
RENOVATE_ALLOWED_COMMANDS: '["make generate"]'

klone.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,35 @@ targets:
99
- folder_name: boilerplate
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
12+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
1313
repo_path: modules/boilerplate
1414
- folder_name: generate-verify
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
17+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
1818
repo_path: modules/generate-verify
1919
- folder_name: go
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
22+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
2323
repo_path: modules/go
2424
- folder_name: help
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
27+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
2828
repo_path: modules/help
2929
- folder_name: klone
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
32+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
3333
repo_path: modules/klone
3434
- folder_name: repository-base
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
37+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
3838
repo_path: modules/repository-base
3939
- folder_name: tools
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: 604ff78fdcd3bc67da8c872979947bb094537d9d
42+
repo_hash: 208a704b638f9964509fccbc8a97db8a824cf375
4343
repo_path: modules/tools

make/_shared/repository-base/01_mod.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ generate-base:
4040
sed "s|{{REPLACE:GH-REPOSITORY}}|$(repo_name:github.com/%=%)|g" "$$file" > "$(CURDIR)/$$file"; \
4141
done
4242
cp -r $(repository_base_dependabot_dir)/. ./
43+
cd $(repository_base_dependabot_dir) && \
44+
find . -type f | while read file; do \
45+
sed "s|{{REPLACE:GH-REPOSITORY}}|$(repo_name:github.com/%=%)|g" "$$file" > "$(CURDIR)/$$file"; \
46+
done
4347
endif
4448

4549
shared_generate_targets += generate-base

make/_shared/repository-base/base-dependabot/.github/dependabot.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@
44
# Update Go dependencies and GitHub Actions dependencies daily.
55
version: 2
66
updates:
7-
- package-ecosystem: gomod
8-
directory: /
9-
schedule:
10-
interval: daily
11-
groups:
12-
all-go-deps:
13-
patterns: ["*"]
147
- package-ecosystem: github-actions
158
directory: /
169
schedule:
1710
interval: daily
1811
exclude-paths: # Exclude files that are mastered from makefile-modules and shouldn't be upgraded in projects using makefile-modules.
1912
- .github/workflows/govulncheck.yaml
2013
- .github/workflows/make-self-upgrade.yaml
14+
- .github/workflows/renovate.yaml
2115
groups:
2216
all-gh-actions:
2317
patterns: ["*"]
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
// Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/renovate.json5 instead.
3+
4+
{
5+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
6+
enabled: true,
7+
enabledManagers: [
8+
'gomod',
9+
],
10+
separateMajorMinor: false,
11+
extends: [
12+
'config:best-practices',
13+
':gitSignOff',
14+
':semanticCommits',
15+
':disableVulnerabilityAlerts',
16+
':prConcurrentLimit10', // Set a limit to avoid too many PRs, at least on the first run
17+
':prHourlyLimitNone',
18+
],
19+
timezone: 'Europe/London',
20+
labels: [
21+
'dependencies',
22+
'kind/cleanup',
23+
'release-note-none',
24+
],
25+
postUpgradeTasks: {
26+
commands: [
27+
'make generate',
28+
],
29+
executionMode: 'branch',
30+
},
31+
packageRules: [
32+
{
33+
groupName: 'Misc Go deps',
34+
matchManagers: [
35+
'gomod',
36+
],
37+
matchPackageNames: [
38+
'*',
39+
],
40+
},
41+
{
42+
groupName: 'Kubernetes Go deps',
43+
matchManagers: [
44+
'gomod',
45+
],
46+
matchPackageNames: [
47+
'sigs.k8s.io**/**',
48+
'k8s.io**/**',
49+
],
50+
},
51+
{
52+
groupName: 'Cloud Go deps',
53+
matchManagers: [
54+
'gomod',
55+
],
56+
matchPackageNames: [
57+
'github.com/akamai**/**',
58+
'github.com/aws**/**',
59+
'github.com/Azure**/**',
60+
'github.com/AzureAD**/**',
61+
'github.com/cloudflare**/**',
62+
'github.com/digitalocean**/**',
63+
'google.golang.org/api',
64+
],
65+
},
66+
{
67+
groupName: 'golang.org/x deps',
68+
matchManagers: [
69+
'gomod',
70+
],
71+
matchPackageNames: [
72+
'golang.org/x**/*',
73+
],
74+
addLabels: [
75+
'skip-review', // Adding label to allow PRs to automerge
76+
],
77+
},
78+
{
79+
description: 'Disable Go pseudo-version updates',
80+
matchManagers: [
81+
'gomod',
82+
],
83+
matchPackageNames: [
84+
'*',
85+
],
86+
matchCurrentValue: 'v0.0.0*',
87+
enabled: false,
88+
},
89+
],
90+
}

0 commit comments

Comments
 (0)