From 05739a77fb245cfa517ee1f39b2f3eb86db9f216 Mon Sep 17 00:00:00 2001 From: linguist <22963968+lowlighter@users.noreply.github.com> Date: Sat, 2 Jan 2021 20:57:35 +0100 Subject: [PATCH] Fix release detection [release] [v3.0] --- action.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index ceaced059f1..c971023ebd4 100644 --- a/action.yml +++ b/action.yml @@ -440,18 +440,18 @@ runs: elif [[ $METRICS_SOURCE == "lowlighter" ]]; then # Is unreleased version set +e - METRICS_IS_UNRELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0) + METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0) set -e - echo "Unreleased: $METRICS_IS_UNRELEASED" + echo "Unreleased: $METRICS_IS_RELEASED" # Rebuild image for unreleased version - if [[ $METRICS_IS_UNRELEASED ]]; then + if [[ $METRICS_IS_RELEASED ]]; then + echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry" + METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG + # Use registry for released version + else echo "Using an unreleased version, rebuilding docker image from Dockerfile" docker build -t metrics:unreleased . METRICS_IMAGE=metrics:unreleased - # Use registry for released version - else - echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry" - METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG fi # Forked action else