modify github workflow

This commit is contained in:
jiacai_wang 2021-04-25 14:46:10 +08:00
parent 28178f54b9
commit 3ab0f8aa2e

View File

@ -1,37 +1,17 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
workspace:
base: /srv/drone-demo
path: .
pipeline:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- 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 .
- name: Test
run: go test -v .
image: golang
# pull: true
commands:
- pwd
- ls
- go env -w GOPROXY=https://goproxy.io,direct
- go get -u github.com/aliyun/alibaba-cloud-sdk-go/sdk
- go get -u github.com/aliyun/alibaba-cloud-sdk-go/services/alidns
- go mod init alidns
- go mod tidy
- go build alidns.go