From b8448a875ece7ec552cd7b095970a6e5484baea6 Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Sat, 10 Jul 2021 09:29:39 +0200 Subject: [PATCH] Create action.yaml --- images/bromite-build/action.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 images/bromite-build/action.yaml diff --git a/images/bromite-build/action.yaml b/images/bromite-build/action.yaml new file mode 100644 index 0000000..437f1cf --- /dev/null +++ b/images/bromite-build/action.yaml @@ -0,0 +1,32 @@ +name: 'Prepare Bromite Builder Image' +description: 'Check and build Bromite builder image by sha' + +inputs: + sha: + description: 'Bromite sha ref' + required: true + +runs: + using: "composite" + steps: + - name: Checking image for "${{ inputs.sha }}" + shell: bash + run: | + BROMITE_SHA="${{ inputs.sha }}" + + 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 + + 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 \ + . + + popd + fi