Patch workflow
This commit is contained in:
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@@ -119,7 +119,7 @@ jobs:
|
|||||||
dryrun: yes
|
dryrun: yes
|
||||||
use_mocked_data: yes
|
use_mocked_data: yes
|
||||||
verify: yes
|
verify: yes
|
||||||
use_prebuilt_image: master
|
use_prebuilt_image: no
|
||||||
|
|
||||||
# Build docker image from master and publish it to GitHub registry with release tag
|
# Build docker image from master and publish it to GitHub registry with release tag
|
||||||
docker-release:
|
docker-release:
|
||||||
|
|||||||
15
action.yml
15
action.yml
@@ -959,24 +959,21 @@ runs:
|
|||||||
# Image name
|
# Image name
|
||||||
# Official action
|
# Official action
|
||||||
if [[ $METRICS_SOURCE == "lowlighter" ]]; then
|
if [[ $METRICS_SOURCE == "lowlighter" ]]; then
|
||||||
|
# Use registry with pre-built images
|
||||||
|
if [[ ! $METRICS_USE_PREBUILT_IMAGE =~ ^([Ff]alse|[Oo]ff|[Nn]o|0)$ ]]; then
|
||||||
# Is released version
|
# Is released version
|
||||||
set +e
|
set +e
|
||||||
METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
|
METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
|
||||||
set -e
|
set -e
|
||||||
echo "Is released version: $METRICS_IS_RELEASED"
|
echo "Is released version: $METRICS_IS_RELEASED"
|
||||||
# Use registry for released version
|
if [[ "$METRICS_IS_RELEASED" -eq "0" ]]; then
|
||||||
if [[ "$METRICS_IS_RELEASED" -gt "0" ]]; then
|
|
||||||
echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry"
|
|
||||||
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
|
||||||
docker image pull $METRICS_IMAGE
|
|
||||||
# Use registry for unreleased version with pre-built images
|
|
||||||
elif [[ ! $METRICS_USE_PREBUILT_IMAGE =~ ^([Ff]alse|[Oo]ff|[Nn]o|0)$ ]]; then
|
|
||||||
METRICS_TAG="$METRICS_TAG-beta"
|
METRICS_TAG="$METRICS_TAG-beta"
|
||||||
echo "Image tag (updated): $METRICS_TAG"
|
echo "Image tag (updated): $METRICS_TAG"
|
||||||
echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry"
|
fi
|
||||||
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
||||||
|
echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry"
|
||||||
docker image pull $METRICS_IMAGE
|
docker image pull $METRICS_IMAGE
|
||||||
# Rebuild image for unreleased version
|
# Rebuild image
|
||||||
else
|
else
|
||||||
echo "Using an unreleased version ($METRICS_VERSION)"
|
echo "Using an unreleased version ($METRICS_VERSION)"
|
||||||
METRICS_IMAGE=metrics:$METRICS_VERSION
|
METRICS_IMAGE=metrics:$METRICS_VERSION
|
||||||
|
|||||||
@@ -56,24 +56,21 @@ runs:
|
|||||||
# Image name
|
# Image name
|
||||||
# Official action
|
# Official action
|
||||||
if [[ $METRICS_SOURCE == "lowlighter" ]]; then
|
if [[ $METRICS_SOURCE == "lowlighter" ]]; then
|
||||||
|
# Use registry with pre-built images
|
||||||
|
if [[ ! $METRICS_USE_PREBUILT_IMAGE =~ ^([Ff]alse|[Oo]ff|[Nn]o|0)$ ]]; then
|
||||||
# Is released version
|
# Is released version
|
||||||
set +e
|
set +e
|
||||||
METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
|
METRICS_IS_RELEASED=$(expr $(expr match $METRICS_VERSION .*-beta) == 0)
|
||||||
set -e
|
set -e
|
||||||
echo "Is released version: $METRICS_IS_RELEASED"
|
echo "Is released version: $METRICS_IS_RELEASED"
|
||||||
# Use registry for released version
|
if [[ "$METRICS_IS_RELEASED" -eq "0" ]]; then
|
||||||
if [[ "$METRICS_IS_RELEASED" -gt "0" ]]; then
|
|
||||||
echo "Using released version $METRICS_TAG, will pull docker image from GitHub registry"
|
|
||||||
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
|
||||||
docker image pull $METRICS_IMAGE
|
|
||||||
# Use registry for unreleased version with pre-built images
|
|
||||||
elif [[ ! $METRICS_USE_PREBUILT_IMAGE =~ ^([Ff]alse|[Oo]ff|[Nn]o|0)$ ]]; then
|
|
||||||
METRICS_TAG="$METRICS_TAG-beta"
|
METRICS_TAG="$METRICS_TAG-beta"
|
||||||
echo "Image tag (updated): $METRICS_TAG"
|
echo "Image tag (updated): $METRICS_TAG"
|
||||||
echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry"
|
fi
|
||||||
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
METRICS_IMAGE=ghcr.io/lowlighter/metrics:$METRICS_TAG
|
||||||
|
echo "Using pre-built version $METRICS_TAG, will pull docker image from GitHub registry"
|
||||||
docker image pull $METRICS_IMAGE
|
docker image pull $METRICS_IMAGE
|
||||||
# Rebuild image for unreleased version
|
# Rebuild image
|
||||||
else
|
else
|
||||||
echo "Using an unreleased version ($METRICS_VERSION)"
|
echo "Using an unreleased version ($METRICS_VERSION)"
|
||||||
METRICS_IMAGE=metrics:$METRICS_VERSION
|
METRICS_IMAGE=metrics:$METRICS_VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user