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