Skip to content

Commit 407e9fe

Browse files
Merge pull request #95 from erikgb/manual-self-upgrade
Manual self upgrade and enable Dependabot/Renovate
2 parents b3e4081 + 4879765 commit 407e9fe

File tree

18 files changed

+376
-45
lines changed

18 files changed

+376
-45
lines changed

.github/dependabot.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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/dependabot.yaml instead.
3+
4+
# Update Go dependencies and GitHub Actions dependencies daily.
5+
version: 2
6+
updates:
7+
- package-ecosystem: github-actions
8+
directory: /
9+
schedule:
10+
interval: daily
11+
exclude-paths: # Exclude files that are mastered from makefile-modules and shouldn't be upgraded in projects using makefile-modules.
12+
- .github/workflows/govulncheck.yaml
13+
- .github/workflows/make-self-upgrade.yaml
14+
- .github/workflows/renovate.yaml
15+
groups:
16+
all-gh-actions:
17+
patterns: ["*"]

.github/renovate.json5

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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+
ignorePaths: [
91+
'**/vendor/**',
92+
],
93+
}

.github/workflows/govulncheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
govulncheck:
1818
runs-on: ubuntu-latest
1919

20-
if: github.repository_owner == 'cert-manager'
20+
if: github.repository == 'cert-manager/csi-lib'
2121

2222
steps:
2323
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/make-self-upgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
self_upgrade:
1616
runs-on: ubuntu-latest
1717

18-
if: github.repository_owner == 'cert-manager'
18+
if: github.repository == 'cert-manager/csi-lib'
1919

2020
permissions:
2121
contents: write

.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/csi-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"]'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ testbin/*
2020

2121
# editor and IDE paraphernalia
2222
.idea
23+
*.iml
2324
*.swp
2425
*.swo
2526
*~

klone.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,55 @@ targets:
99
- folder_name: boilerplate
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
12+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
1313
repo_path: modules/boilerplate
1414
- folder_name: cert-manager
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
17+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
1818
repo_path: modules/cert-manager
1919
- folder_name: controller-gen
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
22+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
2323
repo_path: modules/controller-gen
2424
- folder_name: generate-verify
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
27+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
2828
repo_path: modules/generate-verify
2929
- folder_name: go
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
32+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
3333
repo_path: modules/go
3434
- folder_name: help
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
37+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
3838
repo_path: modules/help
3939
- folder_name: kind
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
42+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
4343
repo_path: modules/kind
4444
- folder_name: klone
4545
repo_url: https://github.com/cert-manager/makefile-modules.git
4646
repo_ref: main
47-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
47+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
4848
repo_path: modules/klone
4949
- folder_name: oci-build
5050
repo_url: https://github.com/cert-manager/makefile-modules.git
5151
repo_ref: main
52-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
52+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
5353
repo_path: modules/oci-build
5454
- folder_name: repository-base
5555
repo_url: https://github.com/cert-manager/makefile-modules.git
5656
repo_ref: main
57-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
57+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
5858
repo_path: modules/repository-base
5959
- folder_name: tools
6060
repo_url: https://github.com/cert-manager/makefile-modules.git
6161
repo_ref: main
62-
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
62+
repo_hash: cd6cfc077a1d1655dff64675ae7e0d209c8ba901
6363
repo_path: modules/tools

make/00_mod.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@ deploy_name := csi-lib
3030
deploy_namespace := cert-manager
3131

3232
golangci_lint_config := .golangci.yaml
33-
34-
repository_base_no_dependabot := 1

make/_shared/boilerplate/01_mod.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
license_base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
16+
1517
.PHONY: verify-boilerplate
1618
## Verify that all files have the correct boilerplate.
1719
## @category [shared] Generate/ Verify
1820
verify-boilerplate: | $(NEEDS_BOILERSUITE)
1921
$(BOILERSUITE) .
2022

2123
shared_verify_targets += verify-boilerplate
24+
25+
.PHONY: generate-license
26+
## Generate LICENSE file in the repository
27+
## @category [shared] Generate/ Verify
28+
generate-license:
29+
cp -r $(license_base_dir)/. ./
30+
31+
shared_generate_targets += generate-base
File renamed without changes.

0 commit comments

Comments
 (0)