diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 99ee388..9e6a368 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -15,16 +15,16 @@ jobs: run: git clone "${{ secrets.G_CLONE_URL }}" . - name: Set go proxy mirror - run: go env -w GOPROXY=https://go.iranserver.com/repository/go/ && go env -w GOSUMDB=off + run: /usr/local/go/bin/go env -w GOPROXY=https://go.iranserver.com/repository/go/ && /usr/local/go/bin/go env -w GOSUMDB=off - name: Download dependencies - run: go mod download + run: /usr/local/go/bin/go mod download - name: Check formatting run: | - if [ "$(gofmt -l $(find . -name '*.go' -not -path './vendor/*'))" ]; then + if [ "$(/usr/local/go/bin/gofmt -l $(find . -name '*.go' -not -path './vendor/*'))" ]; then echo "Files not properly formatted:" - gofmt -l $(find . -name '*.go' -not -path './vendor/*') + /usr/local/go/bin/gofmt -l $(find . -name '*.go' -not -path './vendor/*') exit 1 fi @@ -37,13 +37,13 @@ jobs: run: git clone "${{ secrets.G_CLONE_URL }}" . - name: Build for Linux amd64 - run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o auth-gate-linux-amd64 . + run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o auth-gate-linux-amd64 . - name: Build for Linux arm64 - run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o auth-gate-linux-arm64 . + run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 /usr/local/go/bin/go build -o auth-gate-linux-arm64 . - name: Build for Windows amd64 - run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o auth-gate-windows-amd64.exe + run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 /usr/local/go/bin/go build -o auth-gate-windows-amd64.exe - name: Package binaries run: |