Further modifications to the action part.

This commit is contained in:
2021-05-09 17:07:58 +01:00
parent 9ab0317b34
commit 10fec688be
2 changed files with 5 additions and 21 deletions
-17
View File
@@ -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"]
+5 -4
View File
@@ -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')"
echo "::set-output name=semantic_version::$(echo $OUT_SEMVER_GEN | sed -e 's|SEMVER ||g')"
echo $OUT_SEMVER_GEN