From 97a5f7f103840adc13025f212fe378adf673a394 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 20 May 2026 17:19:44 +0000 Subject: [PATCH] Align files --- .../zz_generated.fix_vulnerabilities.yaml | 5 +++-- .../zz_generated.semantic_pull_request.yaml | 22 +++++++++++++++++++ Makefile.gen.go.mk | 14 +++++++----- 3 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/zz_generated.semantic_pull_request.yaml diff --git a/.github/workflows/zz_generated.fix_vulnerabilities.yaml b/.github/workflows/zz_generated.fix_vulnerabilities.yaml index 05fb25cc..436cfc78 100644 --- a/.github/workflows/zz_generated.fix_vulnerabilities.yaml +++ b/.github/workflows/zz_generated.fix_vulnerabilities.yaml @@ -2,7 +2,7 @@ # # devctl # -# https://github.com/giantswarm/devctl/blob/6ff4d7652142f59436c1d1ef925f8d687e1ac671/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template +# https://github.com/giantswarm/devctl/blob/8d8b9dbd820fc286616891556b0ed5299130ee30/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template # name: Fix Go vulnerabilities @@ -14,11 +14,12 @@ on: inputs: branch: description: Branch on which to fix vulnerabilities + default: main required: true type: string log_level: description: Log Level (info / error / debug) - default: "info" + default: info type: string permissions: {} diff --git a/.github/workflows/zz_generated.semantic_pull_request.yaml b/.github/workflows/zz_generated.semantic_pull_request.yaml new file mode 100644 index 00000000..466b01ff --- /dev/null +++ b/.github/workflows/zz_generated.semantic_pull_request.yaml @@ -0,0 +1,22 @@ +# DO NOT EDIT. Generated with: +# +# devctl +# +# https://github.com/giantswarm/devctl/blob/814a91071850fc945ec1d58f92b761156ad7edb4/pkg/gen/input/workflows/internal/file/semantic_pull_request.yaml.template +# +name: semantic-pull-request + +on: + pull_request: + types: + - opened + - edited + - synchronize + +permissions: {} + +jobs: + semantic-pull-request: + uses: giantswarm/github-workflows/.github/workflows/semantic-pull-request.yaml@main + permissions: + pull-requests: read diff --git a/Makefile.gen.go.mk b/Makefile.gen.go.mk index a186ca71..c2aebea4 100644 --- a/Makefile.gen.go.mk +++ b/Makefile.gen.go.mk @@ -2,13 +2,15 @@ # # devctl # -# https://github.com/giantswarm/devctl/blob/bf7f386ac6a4e807dde959892df1369fee6d789f/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template +# https://github.com/giantswarm/devctl/blob/243afc98a2832b4f85f9b1d99b15fcd2af5dff06/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template # APPLICATION := $(shell go list -m | cut -d '/' -f 3) BUILDTIMESTAMP := $(shell date -u '+%FT%TZ') GITSHA1 := $(shell git rev-parse --verify HEAD) MODULE := $(shell go list -m) +# main() is usually in `main.go`, but sometimes in `cmd/main.go` (for example in newer kubebuilder projects) +MAIN_SOURCE := $(shell if test -e cmd/main.go; then echo cmd/main.go; else echo main.go; fi) OS := $(shell go env GOOS) SOURCES := $(shell find . -name '*.go') VERSION := $(shell architect project version) @@ -63,25 +65,25 @@ $(APPLICATION)-windows-amd64.exe: $(APPLICATION)-v$(VERSION)-windows-amd64.exe $(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES) @echo "====> $@" - CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ . + CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)" $(APPLICATION)-v$(VERSION)-%-arm64: $(SOURCES) @echo "====> $@" - CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ . + CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)" $(APPLICATION)-v$(VERSION)-windows-amd64.exe: $(SOURCES) @echo "====> $@" - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ . + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)" .PHONY: install install: ## Install the application. @echo "====> $@" - go install -ldflags "$(LDFLAGS)" . + go build -ldflags "$(LDFLAGS)" -o "$(shell go env GOPATH)/bin/$(APPLICATION)" "$(MAIN_SOURCE)" .PHONY: run run: ## Runs go run main.go. @echo "====> $@" - go run -ldflags "$(LDFLAGS)" -race . + go run -ldflags "$(LDFLAGS)" -race "$(MAIN_SOURCE)" .PHONY: clean clean: ## Cleans the binary.