From 9bb5cdeff4c0de463ddb8610c89754cccd861956 Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Sun, 11 Jul 2021 12:39:16 +0200 Subject: [PATCH] Update action.yaml --- images/bromite-build/action.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/images/bromite-build/action.yaml b/images/bromite-build/action.yaml index 437f1cf..434da44 100644 --- a/images/bromite-build/action.yaml +++ b/images/bromite-build/action.yaml @@ -14,19 +14,21 @@ runs: run: | BROMITE_SHA="${{ inputs.sha }}" - IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) + IS_PRESENT=$(docker inspect --type=image uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) if [ $IS_PRESENT -ne "0" ]; then - echo "Image not found" + IS_PRESENT=$(docker manifest inspect uazo/bromite-build:$BROMITE_SHA > /dev/null ; echo $?) + if [ $IS_PRESENT -ne "0" ]; then + echo "Image not found" - mkdir bromite-source - pushd bromite-source/ - git clone https://github.com/uazo/bromite-buildtools + mkdir bromite-source + pushd bromite-source/ + git clone https://github.com/uazo/bromite-buildtools - cd bromite-buildtools/images/bromite-build/ - DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$BROMITE_SHA --progress plain \ - --no-cache \ - --build-arg BROMITE_SHA=$BROMITE_SHA \ - . + cd bromite-buildtools/images/bromite-build/ + DOCKER_BUILDKIT=1 docker build -t uazo/bromite-build:$BROMITE_SHA --progress plain \ + --build-arg BROMITE_SHA=$BROMITE_SHA \ + . - popd + popd + fi fi