commit 3d3ad8f6bff756ed76c782e102651341fd38d1f8 Author: Vlad Durnea Date: Sat Oct 31 09:10:38 2026 +0200 better-setup-golangci-lint v1: pinned static binary diff --git a/README.md b/README.md new file mode 100644 index 0000000..a39fe7f --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# better-setup-golangci-lint + +Pinned static golangci-lint from the release tarball — no install-script round-trips, runs on +musl runner images. + +```yaml +- uses: https://git.madapes.com/actions/better-setup-golangci-lint@v1 + with: { version: "2.15.0" } +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..8ece706 --- /dev/null +++ b/action.yml @@ -0,0 +1,24 @@ +name: better-setup-golangci-lint +description: Install a pinned golangci-lint binary statically from its GitHub release asset — musl-safe, no GitHub API probe, Forgejo/act runner safe. +inputs: + version: + description: Exact golangci-lint version to install (x.y.z). + required: true +runs: + using: composite + steps: + - shell: bash + run: | + set -euo pipefail + v="${{ inputs.version }}" + case "$(uname -m)" in + x86_64|amd64) arch=amd64 ;; + aarch64|arm64) arch=arm64 ;; + *) echo "better-setup-golangci-lint: unsupported arch $(uname -m)" >&2; exit 1 ;; + esac + curl --retry 3 --retry-delay 2 -fsSL -o /tmp/gcl.tgz \ + "https://github.com/golangci/golangci-lint/releases/download/v${v}/golangci-lint-${v}-linux-${arch}.tar.gz" + tar -xzf /tmp/gcl.tgz -C /tmp "golangci-lint-${v}-linux-${arch}/golangci-lint" + mv "/tmp/golangci-lint-${v}-linux-${arch}/golangci-lint" /usr/local/bin/golangci-lint + rm -rf /tmp/gcl.tgz "/tmp/golangci-lint-${v}-linux-${arch}" + golangci-lint version