commit c32c004715283db66c57719a1348db0604067ee1 Author: Vlad Durnea Date: Sat Oct 31 10:56:56 2026 +0200 better-setup-deadcode v1: pinned go install diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a336af --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# better-setup-deadcode + +Pinned `golang.org/x/tools/cmd/deadcode` via `go install` (run it after better-setup-go). + +```yaml +- uses: https://git.madapes.com/actions/better-setup-go@v1 + with: { go-version: "1.27.0" } +- uses: https://git.madapes.com/actions/better-setup-deadcode@v1 + with: { version: "v0.52.0" } +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..5aa7b07 --- /dev/null +++ b/action.yml @@ -0,0 +1,14 @@ +name: better-setup-deadcode +description: Install a pinned golang.org/x/tools deadcode binary via go install (requires Go on PATH) — no package manager needed, Forgejo/act runner safe. +inputs: + version: + description: Exact golang.org/x/tools version (vX.Y.Z) providing cmd/deadcode. + required: true +runs: + using: composite + steps: + - shell: bash + run: | + set -euo pipefail + GOBIN=/usr/local/bin go install "golang.org/x/tools/cmd/deadcode@${{ inputs.version }}" + deadcode -h 2>&1 | head -1