From d01a83771d2d8e4f8617b9cc8ba3feafcd04e347 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 9 May 2021 17:25:59 +0100 Subject: [PATCH] Further modifications to the action part #2 --- action.yml | 2 +- entrypoint.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 8c6bd91..dd41bed 100644 --- a/action.yml +++ b/action.yml @@ -21,4 +21,4 @@ outputs: description: 'Calculated semantic version' runs: using: 'docker' - image: docker://ghcr.io/lukaszraczylo/semver-generator:latest + image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh index 5a09166..078933b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,6 @@ FLAGS="" if [[ -z "$INPUT_CONFIG_FILE" ]]; then echo "Set the configuration file path." - exit 1 else FLAGS="${FLAGS} -c $INPUT_CONFIG_FILE" fi @@ -13,7 +12,6 @@ fi if [[ -z "$INPUT_REPOSITORY_URL" ]] && [[ -z "$INPUT_REPOSITORY_LOCAL" ]]; then echo "You need to set either remote repository or repository local flags." - exit 1 fi if [[ ! -z "$INPUT_REPOSITORY_URL" ]]; then @@ -24,6 +22,10 @@ if [[ ! -z "$INPUT_REPOSITORY_LOCAL" ]]; then FLAGS="${FLAGS} -l" fi +if [[ "${FLAGS}" == "" && "$*" == "" ]]; then + exit 1 +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 $OUT_SEMVER_GEN \ No newline at end of file