fail on error (#20)

ci-via-github-actions
This commit is contained in:
Casey Lee
2019-01-23 11:51:22 -08:00
committed by GitHub
parent f98caa2656
commit 320e9b6057
1274 changed files with 398630 additions and 9 deletions

View File

@@ -1,6 +1,12 @@
FROM golangci/golangci-lint:v1.12.5
LABEL "com.github.actions.name"="Check"
LABEL "com.github.actions.description"="Run static analysis and unit tests"
LABEL "com.github.actions.icon"="check-circle"
LABEL "com.github.actions.color"="green"
COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod +x /entrypoint.sh
ENV GOFLAGS -mod=vendor
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -1,4 +1,4 @@
#!/bin/sh
set -e
golangci-lint run
go test -cover ./...

10
.github/main.workflow vendored
View File

@@ -7,7 +7,7 @@ action "check" {
uses = "./.github/actions/check"
}
action "branch-filter" {
action "release-filter" {
needs = ["check"]
uses = "actions/bin/filter@master"
args = "tag v*"
@@ -15,7 +15,7 @@ action "branch-filter" {
# only release on `v*` tags
action "release" {
needs = ["branch-filter"]
needs = ["release-filter"]
uses = "docker://goreleaser/goreleaser:v0.98"
args = "release"
secrets = ["GITHUB_TOKEN"]
@@ -27,3 +27,9 @@ action "build" {
args = "--snapshot --rm-dist"
secrets = ["SNAPSHOT_VERSION"]
}
# local action for `make vendor`
action "vendor" {
uses = "docker://golang:1.11.4"
args = "go mod vendor"
}