diff --git a/Dockerfile-action b/Dockerfile-action deleted file mode 100644 index f0d617f..0000000 --- a/Dockerfile-action +++ /dev/null @@ -1,17 +0,0 @@ -# syntax=docker/dockerfile:1.2.1-labs - -FROM golang:1-alpine as baseimg - -RUN apk add make -WORKDIR /go/src/app -ENV GO111MODULE=on CGO_ENABLED=1 GOOS=linux -COPY . /go/src/app/ -RUN make - -FROM alpine:latest -RUN apk add --no-cache ca-certificates -WORKDIR /go/src/app -COPY --from=baseimg /go/src/app/semver-gen . -COPY --from=baseimg /go/src/app/config-release.yaml config.yaml -COPY entrypoint.sh entrypoint.sh -ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 19c975a..5a09166 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,7 +7,7 @@ if [[ -z "$INPUT_CONFIG_FILE" ]]; then echo "Set the configuration file path." exit 1 else - FLAGS+=" -c $INPUT_CONFIG_FILE" + FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE" fi if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]]; @@ -17,12 +17,13 @@ then fi if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then - FLAGS+=" -r $INPUT_REPOSITORY_URL" + FLAGS="${FLAGS} -r $INPUT_REPOSITORY_URL" fi if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then - FLAGS+=" -l" + FLAGS="${FLAGS} -l" fi OUT_SEMVER_GEN=$(/go/src/app/semver-gen generate $FLAGS $*) -echo "::set-output name=semantic_version::$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')" \ No newline at end of file +echo "::set-output name=semantic_version::$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')" +echo $OUT_SEMVER_GEN \ No newline at end of file