6
.github/actions/check/Dockerfile
vendored
6
.github/actions/check/Dockerfile
vendored
@@ -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"]
|
2
.github/actions/check/entrypoint.sh
vendored
2
.github/actions/check/entrypoint.sh
vendored
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
golangci-lint run
|
||||
go test -cover ./...
|
10
.github/main.workflow
vendored
10
.github/main.workflow
vendored
@@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user