From 072fd782b6821d071ec994ff76d1884bc5a34e63 Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:26:07 +0200 Subject: [PATCH] Create action.yaml --- images/bromite-source/action.yaml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 images/bromite-source/action.yaml diff --git a/images/bromite-source/action.yaml b/images/bromite-source/action.yaml new file mode 100644 index 0000000..4942d28 --- /dev/null +++ b/images/bromite-source/action.yaml @@ -0,0 +1,37 @@ +name: 'Prepare Bromite Source Image' +description: 'Check and build build bromite source image by version' + +inputs: + version: + description: 'Chromium Version (example 91.0.4472.146)' + required: true + + sha: + description: 'Bromite sha ref' + required: true + +runs: + using: "composite" + steps: + - name: Checking image for "${{ inputs.sha }}" + shell: bash + run: | + BROMITE_SHA="${{ inputs.sha }}" + VERSION="${{ inputs.version }}" + + IS_PRESENT=$(docker manifest inspect uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?) + if [ $IS_PRESENT -ne "0" ]; then + echo "Image not found" + + mkdir bromite-source + pushd bromite-source/ + + cd bromite-buildtools/images/bromite-source/ + docker build -t uazo/bromite:$BROMITE_SHA --progress plain \ + --build-arg BROMITE_SHA=$BROMITE_SHA \ + --build-arg VERSION=$VERSION \ + . + + popd + rm -rf bromite-source + fi