1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-05 18:40:59 +00:00
forgejo-runner/Makefile

149 lines
4.3 KiB
Makefile
Raw Normal View History

DIST := dist
2023-04-30 18:13:11 +02:00
EXECUTABLE := forgejo-runner
GOFMT ?= gofumpt -l
DIST := dist
DIST_DIRS := $(DIST)/binaries $(DIST)/release
GO ?= $(shell go env GOROOT)/bin/go
SHASUM ?= shasum -a 256
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
LINUX_ARCHS ?= linux/amd64,linux/arm64
DARWIN_ARCHS ?= darwin-12/amd64,darwin-12/arm64
WINDOWS_ARCHS ?= windows/amd64
GO_FMT_FILES := $(shell find . -type f -name "*.go" ! -name "generated.*")
GOFILES := $(shell find . -type f -name "*.go" -o -name "go.mod" ! -name "generated.*")
Update module github.com/vektra/mockery/v2 to v3 (#841) This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) | `v2.53.4` -> `v3.5.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fvektra%2fmockery%2fv2/v3.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fvektra%2fmockery%2fv2/v2.53.4/v3.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>vektra/mockery (github.com/vektra/mockery/v2)</summary> ### [`v3.5.2`](https://github.com/vektra/mockery/releases/tag/v3.5.2) [Compare Source](https://github.com/vektra/mockery/compare/v3.5.1...v3.5.2) #### What's Changed - Fix bug with replace-type not working with pointers by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1099 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.5.1...v3.5.2 ### [`v3.5.1`](https://github.com/vektra/mockery/releases/tag/v3.5.1) [Compare Source](https://github.com/vektra/mockery/compare/v3.5.0...v3.5.1) #### What's Changed - Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in https://github.com/vektra/mockery/pull/1081 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.5.0...v3.5.1 ### [`v3.5.0`](https://github.com/vektra/mockery/releases/tag/v3.5.0) [Compare Source](https://github.com/vektra/mockery/compare/v3.4.0...v3.5.0) #### What's Changed - Add `inpackage` flag to override in-package detection logic by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1077 - Add `include-auto-generated` config option by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1079 - Fix issue with rendering multiple templates from same interface by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1080 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.4.0...v3.5.0 ### [`v3.4.0`](https://github.com/vektra/mockery/releases/tag/v3.4.0) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.6...v3.4.0) #### What's Changed - Fix issue with type alias to interface not being generated by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1074 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.6...v3.4.0 ### [`v3.3.6`](https://github.com/vektra/mockery/releases/tag/v3.3.6) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.5...v3.3.6) #### What's Changed - Separate release into reusable github action by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1071 - Fix matryer template imports when outputting mock to different package than source by [@&#8203;chadwpetersen](https://github.com/chadwpetersen) in https://github.com/vektra/mockery/pull/1061 - Fix issue in koanf v2.2.1 by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1068 #### New Contributors - [@&#8203;chadwpetersen](https://github.com/chadwpetersen) made their first contribution in https://github.com/vektra/mockery/pull/1061 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.5...v3.3.6 ### [`v3.3.5`](https://github.com/vektra/mockery/compare/v3.3.4...v3.3.5) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.4...v3.3.5) ### [`v3.3.4`](https://github.com/vektra/mockery/releases/tag/v3.3.4) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.3...v3.3.4) #### What's Changed - Ditch pathlib and fix Windows bugs by [@&#8203;kgadams](https://github.com/kgadams) in https://github.com/vektra/mockery/pull/1062 #### New Contributors - [@&#8203;kgadams](https://github.com/kgadams) made their first contribution in https://github.com/vektra/mockery/pull/1062 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.2...v3.3.4 ### [`v3.3.3`](https://github.com/vektra/mockery/compare/v3.3.2...v3.3.3) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.2...v3.3.3) ### [`v3.3.2`](https://github.com/vektra/mockery/releases/tag/v3.3.2) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.1...v3.3.2) #### What's Changed - Fix anchors causing panics by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1058 - Fix issue with relative `dir` values causing invalid in-package calculation by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1059 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.1...v3.3.2 ### [`v3.3.1`](https://github.com/vektra/mockery/releases/tag/v3.3.1) [Compare Source](https://github.com/vektra/mockery/compare/v3.3.0...v3.3.1) #### What's Changed - Fix issue when no value specified for variadic arg by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1055 - Bump github.com/spf13/viper from 1.15.0 to 1.20.1 in /tools by [@&#8203;peczenyj](https://github.com/peczenyj) in https://github.com/vektra/mockery/pull/1036 #### New Contributors - [@&#8203;peczenyj](https://github.com/peczenyj) made their first contribution in https://github.com/vektra/mockery/pull/1036 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.0...v3.3.1 ### [`v3.3.0`](https://github.com/vektra/mockery/releases/tag/v3.3.0) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.5...v3.3.0) #### What's Changed - Fix uppercase generic type parameters by [@&#8203;fen4o](https://github.com/fen4o) in https://github.com/vektra/mockery/pull/1022 - Add parameter type to EXPECT method doc comments. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1034 - Fix missing dependency by running go mod tidy by [@&#8203;miner46er](https://github.com/miner46er) in https://github.com/vektra/mockery/pull/1045 - Fix issue with nil in `.Run()` causing panic by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1043 - Fix unroll-variadic default in v3 migration by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1054 #### New Contributors - [@&#8203;fen4o](https://github.com/fen4o) made their first contribution in https://github.com/vektra/mockery/pull/1022 - [@&#8203;miner46er](https://github.com/miner46er) made their first contribution in https://github.com/vektra/mockery/pull/1045 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.5...v3.3.0 ### [`v3.2.5`](https://github.com/vektra/mockery/releases/tag/v3.2.5) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.4...v3.2.5) #### What's Changed - Disable `goimports` from messing with imports by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1032 - Fix mockery reading auto-generated files by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1029 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.4...v3.2.5 ### [`v3.2.4`](https://github.com/vektra/mockery/releases/tag/v3.2.4) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.3...v3.2.4) #### What's Changed - Recursive package generation regex fix by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1026 - Fix variadic parameter handling in `.EXPECT().Run()` by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1027 - Fix unknown `MOCKERY_` env vars causing panics by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1028 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.3...v3.2.4 ### [`v3.2.3`](https://github.com/vektra/mockery/releases/tag/v3.2.3) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.2...v3.2.3) #### What's Changed - Mention PackageName template variable deprecation by [@&#8203;thejan2009](https://github.com/thejan2009) in https://github.com/vektra/mockery/pull/1018 #### New Contributors - [@&#8203;thejan2009](https://github.com/thejan2009) made their first contribution in https://github.com/vektra/mockery/pull/1018 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.2...v3.2.3 ### [`v3.2.2`](https://github.com/vektra/mockery/releases/tag/v3.2.2) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.1...v3.2.2) #### What's Changed - Fix issue with scope lookup returning nil by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1010 - Fix variadic mock generation when `unroll-variadic: false`. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1011 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.1...v3.2.2 ### [`v3.2.1`](https://github.com/vektra/mockery/releases/tag/v3.2.1) [Compare Source](https://github.com/vektra/mockery/compare/v3.2.0...v3.2.1) #### What's Changed - Fix invalid generation when variadic has no return values by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1007 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.0...v3.2.1 ### [`v3.2.0`](https://github.com/vektra/mockery/releases/tag/v3.2.0) [Compare Source](https://github.com/vektra/mockery/compare/v3.1.0...v3.2.0) #### What's Changed - Fix `with-expecter` in migrate command by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1002 - Change `force-file-write` default to be `true`. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1003 - Fix issue with variadic arguments from return function provider by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1004 - Bump github.com/go-git/go-git/v5 from 5.12.0 to 5.13.0 in /tools by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/vektra/mockery/pull/1005 - Bump golang.org/x/net from 0.33.0 to 0.36.0 in /tools by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/vektra/mockery/pull/1006 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.1.0...v3.2.0 ### [`v3.1.0`](https://github.com/vektra/mockery/releases/tag/v3.1.0) [Compare Source](https://github.com/vektra/mockery/compare/v3.0.2...v3.1.0) #### What's Changed - v3: Build release with latest stable Go version by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/998 - v3: Add `*ast.GenDecl` and `*ast.TypeSpec` comments to `template.Interface` by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/999 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.2...v3.1.0 ### [`v3.0.2`](https://github.com/vektra/mockery/releases/tag/v3.0.2) [Compare Source](https://github.com/vektra/mockery/compare/v3.0.1...v3.0.2) #### What's Changed - v3: Fix constructor name not respecting exported-ness by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/995 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.1...v3.0.2 ### [`v3.0.1`](https://github.com/vektra/mockery/releases/tag/v3.0.1) [Compare Source](https://github.com/vektra/mockery/compare/v3.0.0...v3.0.1) #### What's Changed - Fixing the v3 docs configuration by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/986 - v3: Fix `mockery init` failing by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/994 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.0...v3.0.1 ### [`v3.0.0`](https://github.com/vektra/mockery/releases/tag/v3.0.0) [Compare Source](https://github.com/vektra/mockery/compare/v2.53.4...v3.0.0) #### What's Changed - v3: Update docs and release for v3 GA. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/985 **Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.0-beta.11...v3.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - other - [PR](https://code.forgejo.org/forgejo/runner/pulls/841): <!--number 841 --><!--line 0 --><!--description VXBkYXRlIG1vZHVsZSBnaXRodWIuY29tL3Zla3RyYS9tb2NrZXJ5L3YyIHRvIHYz-->Update module github.com/vektra/mockery/v2 to v3<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/841 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: Renovate Bot <bot@kriese.eu> Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-08-11 05:33:56 +00:00
MOCKERY_PACKAGE ?= github.com/vektra/mockery/v2@v3.5.2 # renovate: datasource=go
Update module github.com/golangci/golangci-lint/v2/cmd/golangci-lint to v2.3.1 (#802) This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/golangci/golangci-lint/v2/cmd/golangci-lint](https://github.com/golangci/golangci-lint) | `v2.3.0` -> `v2.3.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint%2fv2%2fcmd%2fgolangci-lint/v2.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint%2fv2%2fcmd%2fgolangci-lint/v2.3.0/v2.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2/cmd/golangci-lint)</summary> ### [`v2.3.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v231) [Compare Source](https://github.com/golangci/golangci-lint/compare/v2.3.0...v2.3.1) 1. Linters bug fixes - `gci`: from 0.13.6 to 0.13.7 - `gosec`: from 2.22.6 to 2.22.7 - `noctx`: from 0.3.5 to 0.4.0 - `wsl`: from 5.1.0 to 5.1.1 - tagliatelle: force upper case for custom initialisms </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40My41IiwidXBkYXRlZEluVmVyIjoiNDEuNDMuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/802 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: Renovate Bot <bot@kriese.eu> Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-08-03 07:20:54 +00:00
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.3.1 # renovate: datasource=go
DOCKER_IMAGE ?= gitea/act_runner
DOCKER_TAG ?= nightly
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
DOCKER_ROOTLESS_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)-dind-rootless
2023-04-30 18:13:11 +02:00
EXTLDFLAGS = -extldflags "-static" $(null)
ifeq ($(HAS_GO), GO)
GOPATH ?= $(shell $(GO) env GOPATH)
export PATH := $(GOPATH)/bin:$(PATH)
CGO_EXTRA_CFLAGS := -DSQLITE_MAX_VARIABLE_NUMBER=32766
CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
endif
ifeq ($(OS), Windows_NT)
GOFLAGS := -v -buildmode=exe
EXECUTABLE ?= $(EXECUTABLE).exe
else ifeq ($(OS), Windows)
GOFLAGS := -v -buildmode=exe
EXECUTABLE ?= $(EXECUTABLE).exe
else
GOFLAGS := -v
EXECUTABLE ?= $(EXECUTABLE)
endif
STORED_VERSION_FILE := VERSION
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
RELEASE_VERSION ?= $(VERSION)
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
else
VERSION ?= main
endif
STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null)
ifneq ($(STORED_VERSION),)
RELEASE_VERSION ?= $(STORED_VERSION)
else
RELEASE_VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
endif
endif
GO_PACKAGES_TO_VET ?= $(filter-out code.forgejo.org/forgejo/runner/v9/internal/pkg/client/mocks,$(shell $(GO) list ./...))
TAGS ?=
LDFLAGS ?= -X "code.forgejo.org/forgejo/runner/v9/internal/pkg/ver.version=v$(RELEASE_VERSION)"
all: build
.PHONY: lint
lint-check:
$(GO) run $(GOLANGCI_LINT_PACKAGE) run $(GOLANGCI_LINT_ARGS)
.PHONY: lint-fix
lint:
$(GO) run $(GOLANGCI_LINT_PACKAGE) run $(GOLANGCI_LINT_ARGS) --fix
fmt:
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install mvdan.cc/gofumpt@latest; \
fi
$(GOFMT) -w $(GO_FMT_FILES)
.PHONY: go-check
go-check:
$(eval MIN_GO_VERSION_STR := $(shell grep -Eo '^go\s+[0-9]+\.[0-9]+' go.mod | cut -d' ' -f2))
$(eval MIN_GO_VERSION := $(shell printf "%03d%03d" $(shell echo '$(MIN_GO_VERSION_STR)' | tr '.' ' ')))
$(eval GO_VERSION := $(shell printf "%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9]+' | tr '.' ' ');))
@if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \
echo "Act Runner requires Go $(MIN_GO_VERSION_STR) or greater to build. You can get it at https://go.dev/dl/"; \
exit 1; \
fi
.PHONY: fmt-check
fmt-check:
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install mvdan.cc/gofumpt@latest; \
fi
@diff=$$($(GOFMT) -d $(GO_FMT_FILES)); \
if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi;
test: lint-check fmt-check
@$(GO) test -v -cover -coverprofile coverage.txt ./internal/... && echo "\n==>\033[32m Ok\033[m\n" || exit 1
.PHONY: vet
vet:
@echo "Running go vet..."
@$(GO) vet $(GO_PACKAGES_TO_VET)
.PHONY: generate
generate:
$(GO) generate ./internal/...
install: $(GOFILES)
$(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)'
build: go-check $(EXECUTABLE)
feat: add the runner validate subcommand (#757) <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - features - [PR](https://code.forgejo.org/forgejo/runner/pulls/757): <!--number 757 --><!--line 0 --><!--description ZmVhdDogdGhlIG5ldyBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGVgIGNvbW1hbmQgY2FuIGJlIHVzZWQgdG8gdmVyaWZ5IGlmIGFuIGFjdGlvbiBvciBhIHdvcmtmbG93IGlzIGNvbmZvcm1hbnQgd2l0aCB0aGUgZXhwZWN0ZWQgc2NoZW1hLiBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGUgLS1yZXBvc2l0b3J5IGh0dHBzOi8vZXhhbXBsZS5jb20vbXkvcmVwb3NpdG9yeWAgd2lsbCB2YWxpZGF0ZSBhbGwgdGhlIHdvcmtmbG93cyBhbmQgYWN0aW9ucyBhIEdpdCByZXBvc2l0b3J5IGNvbnRhaW5zLiBBbHRlcm5hdGl2ZWx5ICBgZm9yZ2Vqby1ydW5uZXIgdmFsaWRhdGUgLS1wYXRoIG15YWN0aW9uL2FjdGlvbi55bWwgLS1hY3Rpb25gIG9yIGBmb3JnZWpvLXJ1bm5lciB2YWxpZGF0ZSAtLXBhdGggLmZvcmdlam8vd29ya2Zsb3dzL3Rlc3QueW1sIC0td29ya2Zsb3dgIGNhbiBiZSB1c2VkIHRvIHZhbGlkYXRlIGEgc2luZ2xlIGZpbGUuIEl0IGlzIHJlY29tbWVuZGVkIHRvIHVzZSB0aGVzZSBjb21tYW5kcyB0byB2ZXJpZnkgZXhpc3RpbmcgYWN0aW9ucyBhbmQgd29ya2Zsb3dzIHBhc3MgYmVmb3JlIHVwZ3JhZGluZyB0byBbRm9yZ2VqbyBydW5uZXIgdjguMC4wXShodHRwczovL2NvZGUuZm9yZ2Vqby5vcmcvZm9yZ2Vqby9ydW5uZXIvc3JjL2JyYW5jaC9tYWluL1JFTEVBU0UtTk9URVMubWQjOC0wLTApIG9yIGFib3ZlIHRvIG5vdCBkaXNydXB0IGV4aXN0aW5nIHdvcmtmbG93cy4=-->feat: the new `forgejo-runner validate` command can be used to verify if an action or a workflow is conformant with the expected schema. `forgejo-runner validate --repository https://example.com/my/repository` will validate all the workflows and actions a Git repository contains. Alternatively `forgejo-runner validate --path myaction/action.yml --action` or `forgejo-runner validate --path .forgejo/workflows/test.yml --workflow` can be used to validate a single file. It is recommended to use these commands to verify existing actions and workflows pass before upgrading to [Forgejo runner v8.0.0](https://code.forgejo.org/forgejo/runner/src/branch/main/RELEASE-NOTES.md#8-0-0) or above to not disrupt existing workflows.<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/757 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-31 05:37:12 +00:00
$(EXECUTABLE): $(GOFILES) act/schema/action_schema.json act/schema/workflow_schema.json
2023-04-30 18:13:11 +02:00
$(GO) build -v -tags 'netgo osusergo $(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o $@
.PHONY: deps-tools
deps-tools:
$(GO) install $(MOCKERY_PACKAGE)
$(DIST_DIRS):
mkdir -p $(DIST_DIRS)
.PHONY: docker
docker:
if ! docker buildx version >/dev/null 2>&1; then \
ARG_DISABLE_CONTENT_TRUST=--disable-content-trust=false; \
fi; \
docker build $${ARG_DISABLE_CONTENT_TRUST} -t $(DOCKER_REF) .
docker build $${ARG_DISABLE_CONTENT_TRUST} -t $(DOCKER_ROOTLESS_REF) -f Dockerfile.rootless .
clean:
$(GO) clean -x -i ./...
rm -rf coverage.txt $(EXECUTABLE) $(DIST)
version:
@echo $(VERSION)