42 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-07 15:26:07 +02:00
name: 'Prepare Bromite Source Image'
2021-07-07 15:26:28 +02:00
description: 'Check and build Bromite sources image by version'
2021-07-07 15:26:07 +02:00
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 }}"
2021-07-11 12:38:25 +02:00
IS_PRESENT=$(docker inspect --type=image uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?)
2021-07-07 15:26:07 +02:00
if [ $IS_PRESENT -ne "0" ]; then
2021-07-11 12:38:25 +02:00
IS_PRESENT=$(docker manifest inspect uazo/bromite:$BROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
echo "Image not found"
2021-07-07 15:26:07 +02:00
2021-07-11 12:38:25 +02:00
mkdir bromite-source
pushd bromite-source/
2021-07-07 15:34:13 +02:00
2021-07-11 12:38:25 +02:00
git clone https://github.com/uazo/bromite-buildtools
2021-07-07 15:26:07 +02:00
2021-07-11 12:38:25 +02:00
cd bromite-buildtools/images/bromite-source/
DOCKER_BUILDKIT=1 docker build -t uazo/bromite:$BROMITE_SHA --progress plain \
--build-arg BROMITE_SHA=$BROMITE_SHA \
--build-arg VERSION=$VERSION \
.
2021-07-07 15:26:07 +02:00
2021-07-11 12:38:25 +02:00
popd
fi
2021-07-07 15:26:07 +02:00
fi