From de62a2eece222901df170122374e777a6fc757d9 Mon Sep 17 00:00:00 2001 From: Casey Lee Date: Thu, 7 Feb 2019 09:50:30 -0800 Subject: [PATCH] resolve issues with release action --- .github/actions/integration/Dockerfile | 12 ++++++++++++ .github/actions/integration/entrypoint.sh | 3 +++ .github/main.workflow | 13 +++++++++++++ Makefile | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/actions/integration/Dockerfile create mode 100644 .github/actions/integration/entrypoint.sh diff --git a/.github/actions/integration/Dockerfile b/.github/actions/integration/Dockerfile new file mode 100644 index 0000000..ca6f430 --- /dev/null +++ b/.github/actions/integration/Dockerfile @@ -0,0 +1,12 @@ +FROM golangci/golangci-lint:v1.12.5 + +LABEL "com.github.actions.name"="Check" +LABEL "com.github.actions.description"="Run integration 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"] \ No newline at end of file diff --git a/.github/actions/integration/entrypoint.sh b/.github/actions/integration/entrypoint.sh new file mode 100644 index 0000000..b6b47f2 --- /dev/null +++ b/.github/actions/integration/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +go test -cover ./actions \ No newline at end of file diff --git a/.github/main.workflow b/.github/main.workflow index edbf63d..a9c393e 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -33,3 +33,16 @@ action "vendor" { uses = "docker://golang:1.11.4" args = "go mod vendor" } + +action "integration-tests" { + needs = ["check"] + uses = "./.github/actions/integration" +} + +# local release +action "local-release" { + needs = ["integration-tests"] + uses = "docker://goreleaser/goreleaser:v0.98" + args = "release" + secrets = ["GITHUB_TOKEN"] +} \ No newline at end of file diff --git a/Makefile b/Makefile index 39ceae4..2866dcc 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ build: check $(ACT) -ra build release: - $(ACT) -ra release + $(ACT) -ra local-release install: build @cp dist/$(shell go env GOOS)_$(shell go env GOARCH)/act /usr/local/bin/act