bromite-buildtools/.github/workflows/build-images.yaml

82 lines
2.5 KiB
YAML
Raw Normal View History

2021-07-02 17:36:12 +05:30
permissions:
actions: none
checks: none
contents: none
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
on:
2022-10-16 19:08:57 +05:30
workflow_dispatch:
inputs:
version:
description: 'chromium version'
required: true
default: ''
env:
VERSION: ${{ github.event.inputs.version }}
2021-07-02 17:36:12 +05:30
name: Builds and pushes tagged image to DockerHub
jobs:
generate_build_deps:
name: Generate Build Deps
runs-on: ubuntu-latest
2022-10-16 19:11:37 +05:30
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
path: bromite-buildtools
fetch-depth: 1
2022-10-16 19:15:46 +05:30
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-10-16 19:11:37 +05:30
2022-10-16 19:08:57 +05:30
- name: Building build-deps container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/build-deps:$VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/build-deps:$VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/build-deps:$VERSION \
--progress plain \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \
bromite-buildtools/images/build-deps/.
fi
fi
2021-07-02 17:36:12 +05:30
2022-10-16 19:08:57 +05:30
- name: Docker Push build-deps
shell: bash
run: |
docker push uazo/build-deps:$VERSION
- name: Building chromium container ${{ env.VERSION }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/chromium:$VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/chromium:$VERSION > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/chromium:$VERSION \
--progress plain \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
bromite-buildtools/images/chr-source/.
fi
fi
- name: Docker Push chromium
shell: bash
run: |
2022-10-16 19:08:57 +05:30
docker push uazo/chromium:$VERSION