mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-07-11 04:31:48 +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."
|
echo "Set the configuration file path."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
FLAGS+=" -c $INPUT_CONFIG_FILE"
|
FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]];
|
if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]];
|
||||||
@@ -17,12 +17,13 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then
|
if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then
|
||||||
FLAGS+=" -r $INPUT_REPOSITORY_URL"
|
FLAGS="${FLAGS} -r $INPUT_REPOSITORY_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then
|
if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then
|
||||||
FLAGS+=" -l"
|
FLAGS="${FLAGS} -l"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUT_SEMVER_GEN=$(/go/src/app/semver-gen generate $FLAGS $*)
|
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