Skip to content

Commit bad5686

Browse files
Merge pull request #10 from ThatsMrTalbot/chore/upgrade-klone
chore: make upgrade-klone
2 parents f913a64 + 92520a6 commit bad5686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1110
-899
lines changed

.github/dependabot.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2-
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/dependabot.yaml instead.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/dependabot.yaml instead.
33

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:
13-
patterns: ["*"]
147
- package-ecosystem: github-actions
158
directory: /
169
schedule:
1710
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
1815
groups:
19-
all:
16+
all-gh-actions:
2017
patterns: ["*"]
18+
labels:
19+
- dependencies
20+
- kind/cleanup
21+
- release-note-none
22+
- ok-to-test

.github/renovate.json5

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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+
gitAuthor: 'cert-manager-bot <[email protected]>',
8+
enabledManagers: [
9+
'gomod',
10+
],
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+
'ok-to-test',
24+
'release-note-none',
25+
],
26+
postUpgradeTasks: {
27+
commands: [
28+
'make generate',
29+
],
30+
executionMode: 'branch',
31+
},
32+
packageRules: [
33+
{
34+
groupName: 'Misc Go deps',
35+
matchManagers: [
36+
'gomod',
37+
],
38+
matchPackageNames: [
39+
'*',
40+
],
41+
},
42+
{
43+
groupName: 'Testing Go deps',
44+
matchManagers: [
45+
'gomod',
46+
],
47+
matchPackageNames: [
48+
'github.com/onsi/ginkgo**/**',
49+
'github.com/onsi/gomega**/**',
50+
'github.com/stretchr/testify**/**',
51+
],
52+
},
53+
{
54+
groupName: 'Cloud Go deps',
55+
matchManagers: [
56+
'gomod',
57+
],
58+
matchPackageNames: [
59+
'github.com/akamai**/**',
60+
'github.com/aws**/**',
61+
'github.com/Azure**/**',
62+
'github.com/AzureAD**/**',
63+
'github.com/cloudflare**/**',
64+
'github.com/digitalocean**/**',
65+
'google.golang.org/api',
66+
],
67+
},
68+
{
69+
groupName: 'Kubernetes Go deps',
70+
matchManagers: [
71+
'gomod',
72+
],
73+
matchPackageNames: [
74+
'sigs.k8s.io**/**',
75+
'k8s.io**/**',
76+
],
77+
},
78+
{
79+
groupName: 'Kubernetes Go patches',
80+
matchManagers: [
81+
'gomod',
82+
],
83+
matchPackageNames: [
84+
'k8s.io**/**',
85+
],
86+
matchUpdateTypes: [
87+
'patch',
88+
],
89+
addLabels: [
90+
'skip-review', // Adding label to allow PRs to automerge
91+
]
92+
},
93+
{
94+
groupName: 'golang.org/x deps',
95+
matchManagers: [
96+
'gomod',
97+
],
98+
matchPackageNames: [
99+
'golang.org/x**/*',
100+
],
101+
addLabels: [
102+
'skip-review', // Adding label to allow PRs to automerge
103+
],
104+
},
105+
{
106+
description: 'Disable Go pseudo-version updates',
107+
matchManagers: [
108+
'gomod',
109+
],
110+
matchPackageNames: [
111+
'*',
112+
],
113+
matchCurrentValue: 'v0.0.0*',
114+
enabled: false,
115+
},
116+
],
117+
ignorePaths: [
118+
'**/vendor/**',
119+
],
120+
}

.github/workflows/govulncheck.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,27 @@ on:
1010
schedule:
1111
- cron: '0 0 * * *'
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
govulncheck:
1518
runs-on: ubuntu-latest
1619

20+
if: github.repository == 'cert-manager/trust-manager-csi-driver'
21+
1722
steps:
18-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
25+
# the tags so `git describe` returns a valid version.
26+
# see https://github.com/actions/checkout/issues/701 for extra info about this option
27+
with: { fetch-depth: 0 }
1928

2029
- id: go-version
2130
run: |
2231
make print-go-version >> "$GITHUB_OUTPUT"
2332
24-
- uses: actions/setup-go@v5
33+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2534
with:
2635
go-version: ${{ steps.go-version.outputs.result }}
2736

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ on:
88
schedule:
99
- cron: '0 0 * * *'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
self_upgrade:
1316
runs-on: ubuntu-latest
1417

18+
if: github.repository == 'cert-manager/trust-manager-csi-driver'
19+
1520
permissions:
1621
contents: write
1722
pull-requests: write
@@ -27,13 +32,17 @@ jobs:
2732
echo "This workflow should not be run on a non-branch-head."
2833
exit 1
2934
30-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
36+
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
37+
# the tags so `git describe` returns a valid version.
38+
# see https://github.com/actions/checkout/issues/701 for extra info about this option
39+
with: { fetch-depth: 0 }
3140

3241
- id: go-version
3342
run: |
3443
make print-go-version >> "$GITHUB_OUTPUT"
3544
36-
- uses: actions/setup-go@v5
45+
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3746
with:
3847
go-version: ${{ steps.go-version.outputs.result }}
3948

@@ -64,7 +73,7 @@ jobs:
6473
git push -f origin "$SELF_UPGRADE_BRANCH"
6574
6675
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }}
67-
uses: actions/github-script@v7
76+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
6877
with:
6978
script: |
7079
const { repo, owner } = context.repo;
@@ -77,7 +86,7 @@ jobs:
7786
});
7887
7988
if (pulls.data.length < 1) {
80-
await github.rest.pulls.create({
89+
const result = await github.rest.pulls.create({
8190
title: '[CI] Merge ' + process.env.SELF_UPGRADE_BRANCH + ' into ' + process.env.SOURCE_BRANCH,
8291
owner: owner,
8392
repo: repo,
@@ -87,4 +96,10 @@ jobs:
8796
'This PR is auto-generated to bump the Makefile modules.',
8897
].join('\n'),
8998
});
99+
await github.rest.issues.addLabels({
100+
owner,
101+
repo,
102+
issue_number: result.data.number,
103+
labels: ['ok-to-test', 'skip-review']
104+
});
90105
}

.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/trust-manager-csi-driver'
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@a447f09147d00e00ae2a82ad5ef51ca89352da80 # v43.0.9
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: '[".*"]'

.golangci.yaml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1+
version: "2"
12
linters:
2-
# Explicitly define all enabled linters
3-
disable-all: true
3+
default: none
4+
exclusions:
5+
generated: lax
6+
presets: [comments, common-false-positives, legacy, std-error-handling]
7+
paths: [third_party, builtin$, examples$]
8+
warn-unused: true
9+
settings:
10+
staticcheck:
11+
checks: ["all", "-ST1000", "-ST1001", "-ST1003", "-ST1005", "-ST1012", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1001", "-QF1003", "-QF1008"]
412
enable:
513
- asasalint
614
- asciicheck
715
- bidichk
816
- bodyclose
17+
- canonicalheader
918
- contextcheck
19+
- copyloopvar
1020
- decorder
1121
- dogsled
1222
- dupword
1323
- durationcheck
1424
- errcheck
1525
- errchkjson
1626
- errname
17-
- execinquery
1827
- exhaustive
19-
- exportloopref
28+
- exptostd
2029
- forbidigo
21-
- gci
2230
- ginkgolinter
2331
- gocheckcompilerdirectives
2432
- gochecksumtype
2533
- gocritic
26-
- gofmt
2734
- goheader
2835
- goprintffuncname
2936
- gosec
30-
- gosimple
3137
- gosmopolitan
3238
- govet
3339
- grouper
3440
- importas
3541
- ineffassign
3642
- interfacebloat
43+
- intrange
3744
- loggercheck
3845
- makezero
3946
- mirror
@@ -51,19 +58,23 @@ linters:
5158
- sloglint
5259
- staticcheck
5360
- tagalign
54-
- tenv
5561
- testableexamples
56-
- typecheck
5762
- unconvert
5863
- unparam
5964
- unused
6065
- usestdlibvars
66+
- usetesting
6167
- wastedassign
62-
linters-settings:
63-
gci:
64-
sections:
65-
- standard # Standard section: captures all standard packages.
66-
- default # Default section: contains all imports that could not be matched to another section type.
67-
- prefix(github.com/cert-manager/trust-manager-csi-driver) # Custom section: groups all imports with the specified Prefix.
68-
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
69-
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
68+
formatters:
69+
enable: [gci, gofmt]
70+
settings:
71+
gci:
72+
sections:
73+
- standard # Standard section: captures all standard packages.
74+
- default # Default section: contains all imports that could not be matched to another section type.
75+
- prefix(github.com/cert-manager/trust-manager-csi-driver) # Custom section: groups all imports with the specified Prefix.
76+
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
77+
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
78+
exclusions:
79+
generated: lax
80+
paths: [third_party, builtin$, examples$]

0 commit comments

Comments
 (0)