Skip to content

Commit

Permalink
Fix release detection [release] [v3.0]
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed Jan 2, 2021
1 parent c7bf1dc commit 05739a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05739a7

Please sign in to comment.