Skip to content

Commit 2439727

Browse files
Merge pull request #639 from erikgb/pinact
Add new verify and fix targets for GH actions
2 parents dc9047a + 8ee55c1 commit 2439727

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ golangci_lint_config := .golangci.yaml # For `make generate-golangci-lint-config
7474
# - generate-verify: to allow renovate to run make generate after updating the `go.mod` files in this repo.
7575
# - boilerplate: to ensure all files have license boilerplate
7676
# - go: so that make go-tidy is triggered by make generate.
77+
# - gh-workflows: so that also this module can benefit from generic reusable workflows and ensure actions are pinned correctly.
7778
#
7879
# Module files must be included in number order (00,01,02) to satisfy the
7980
# dependencies between them.
@@ -82,6 +83,7 @@ include modules/generate-verify/00_mod.mk
8283
include modules/boilerplate/00_mod.mk
8384
include modules/boilerplate/01_mod.mk
8485
include modules/go/01_mod.mk
86+
include modules/gh-workflows/01_mod.mk
8587
include modules/generate-verify/02_mod.mk
8688

8789
## Upgrade targets

modules/gh-workflows/01_mod.mk

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2026 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
.PHONY: verify-pinact
16+
## Verify all actions have pinned digests with matching version comment
17+
## @category [shared] Generate/ Verify
18+
verify-pinact: | $(NEEDS_PINACT)
19+
$(PINACT) run --check --verify-comment
20+
21+
shared_verify_targets += verify-pinact
22+
23+
.PHONY: fix-pinact
24+
## Fix all actions have pinned digests with matching version comment
25+
## @category [shared] Generate/ Verify
26+
fix-pinact: | $(NEEDS_PINACT)
27+
$(PINACT) run --fix --verify-comment

modules/tools/00_mod.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ tools += yamlfmt=v0.21.0
200200
# https://github.com/yannh/kubeconform/releases
201201
# renovate: datasource=github-releases packageName=yannh/kubeconform
202202
tools += kubeconform=v0.8.0
203+
# https://github.com/suzuki-shunsuke/pinact/releases
204+
# renovate: datasource=github-releases packageName=suzuki-shunsuke/pinact
205+
tools += pinact=v4.1.0
203206

204207
# FIXME(erikgb): cert-manager needs the ability to override the version set here
205208
# https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions
@@ -431,6 +434,7 @@ go_dependencies += gh=github.com/cli/cli/v2/cmd/gh
431434
go_dependencies += gci=github.com/daixiang0/gci
432435
go_dependencies += yamlfmt=github.com/google/yamlfmt/cmd/yamlfmt
433436
go_dependencies += kubeconform=github.com/yannh/kubeconform/cmd/kubeconform
437+
go_dependencies += pinact=github.com/suzuki-shunsuke/pinact/v4/cmd/pinact
434438

435439
#################
436440
# go build tags #

0 commit comments

Comments
 (0)