From ae9b3f38d60981d95b42b67c46cd96f9ba2a15ad Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Thu, 26 Aug 2021 15:39:42 -0700 Subject: [PATCH] github: set GOOS/GOARCH for `go list` Currently we do not set the env variables for `go list ./...` resulting in errors like ``` build constraints exclude all Go files in /home/runner/work/tailscale/tailscale/chirp ``` Signed-off-by: Maisem Ali --- .github/workflows/staticcheck.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staticcheck.yml b/.github/workflows/staticcheck.yml index 607e035dd..b6b5d67c3 100644 --- a/.github/workflows/staticcheck.yml +++ b/.github/workflows/staticcheck.yml @@ -31,16 +31,28 @@ jobs: run: "staticcheck -version" - name: Run staticcheck (linux/amd64) - run: "GOOS=linux GOARCH=amd64 staticcheck -- $(go list ./... | grep -v tempfork)" + env: + GOOS: linux + GOARCH: amd64 + run: "staticcheck -- $(go list ./... | grep -v tempfork)" - name: Run staticcheck (darwin/amd64) - run: "GOOS=darwin GOARCH=amd64 staticcheck -- $(go list ./... | grep -v tempfork)" + env: + GOOS: darwin + GOARCH: amd64 + run: "staticcheck -- $(go list ./... | grep -v tempfork)" - name: Run staticcheck (windows/amd64) - run: "GOOS=windows GOARCH=amd64 staticcheck -- $(go list ./... | grep -v tempfork)" + env: + GOOS: windows + GOARCH: amd64 + run: "staticcheck -- $(go list ./... | grep -v tempfork)" - name: Run staticcheck (windows/386) - run: "GOOS=windows GOARCH=386 staticcheck -- $(go list ./... | grep -v tempfork)" + env: + GOOS: windows + GOARCH: "386" + run: "staticcheck -- $(go list ./... | grep -v tempfork)" - uses: k0kubun/action-slack@v2.0.0 with: