From 308715d02cee2a321e610a0dba3fc6b69cf4fc15 Mon Sep 17 00:00:00 2001 From: hbc Date: Fri, 16 Aug 2019 10:17:23 +0800 Subject: [PATCH 1/5] Init pipeline --- .github/workflows/go.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..151971c --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,28 @@ +name: Go +on: [push] +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Get dependencies + run: | + 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 . From bff9db447b6e7bd0b352f292f8e4283949282a77 Mon Sep 17 00:00:00 2001 From: hbc Date: Fri, 16 Aug 2019 10:20:12 +0800 Subject: [PATCH 2/5] Create bin dir --- .github/workflows/go.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 151971c..d38507c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,6 +18,7 @@ jobs: - name: Get dependencies run: | + mkdir -p /home/runner/go/bin go get -v -t -d ./... if [ -f Gopkg.toml ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh From e07a821ae59ab028f094888c895190b924e7645e Mon Sep 17 00:00:00 2001 From: hbc Date: Fri, 16 Aug 2019 10:23:20 +0800 Subject: [PATCH 3/5] Install dep --- .github/workflows/go.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d38507c..0efd05b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,10 +20,8 @@ jobs: run: | mkdir -p /home/runner/go/bin go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure - name: Build run: go build -v . From 1c05f7ad2274c6624a1830a8dd37e6eba11707f9 Mon Sep 17 00:00:00 2001 From: hbc Date: Fri, 16 Aug 2019 10:26:09 +0800 Subject: [PATCH 4/5] Set dep path --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0efd05b..0afdea3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -21,7 +21,7 @@ jobs: mkdir -p /home/runner/go/bin go get -v -t -d ./... curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure + /home/runner/go/bin/dep ensure - name: Build run: go build -v . From 5205955c461b07dc1153ab4336ec9a7ec34747b8 Mon Sep 17 00:00:00 2001 From: hbc Date: Fri, 16 Aug 2019 10:34:32 +0800 Subject: [PATCH 5/5] Remove dep --- .github/workflows/go.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0afdea3..ec99540 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,8 +20,6 @@ jobs: run: | mkdir -p /home/runner/go/bin go get -v -t -d ./... - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - /home/runner/go/bin/dep ensure - name: Build run: go build -v .