Skip to content

Commit 05739a7

Browse files
committed
Fix release detection [release] [v3.0]
1 parent c7bf1dc commit 05739a7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,18 +440,18 @@ runs:
440440
elif [[ $METRICS_SOURCE == "lowlighter" ]]; then
441441
# Is unreleased version
442442
set +e
443-
METRICS_IS_UNRELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
443+
METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
444444
set -e
445-
echo "Unreleased: $METRICS_IS_UNRELEASED"
445+
echo "Unreleased: $METRICS_IS_RELEASED"
446446
# Rebuild image for unreleased version
447-
if [[ $METRICS_IS_UNRELEASED ]]; then
447+
if [[ $METRICS_IS_RELEASED ]]; then
448+
echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry"
449+
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
450+
# Use registry for released version
451+
else
448452
echo "Using an unreleased version, rebuilding docker image from Dockerfile"
449453
docker build -t metrics:unreleased .
450454
METRICS_IMAGE=metrics:unreleased
451-
# Use registry for released version
452-
else
453-
echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry"
454-
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
455455
fi
456456
# Forked action
457457
else

0 commit comments

Comments
 (0)