From 4b22d08d0b911bf4c72357a3717ddedb57a6705e Mon Sep 17 00:00:00 2001 From: esrrhs Date: Tue, 28 Sep 2021 16:34:29 +0800 Subject: [PATCH] Update go.yml --- .github/workflows/go.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c06d453..1d90391 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,30 +1,29 @@ name: Go -on: [push] + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + jobs: build: - name: Build runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - - name: Set up Go 1.14 - uses: actions/setup-go@v1 + - name: Set up Go + uses: actions/setup-go@v2 with: - go-version: 1.14 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v1 + go-version: 1.17 - name: Get dependencies run: | - go get -v -t -d ./... + GO111MODULE=off go get -v -t -d ./... if [ -f Gopkg.toml ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure fi - - name: Build - run: | - go build -v . - ./pingtunnel + run: GO111MODULE=off go build -v ./...