mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-08 23:03:44 +00:00
Further modifications to the action part.
This commit is contained in:
@@ -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
@@ -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
|
||||
Reference in New Issue
Block a user