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

114 lines
3.9 KiB
YAML
Raw Normal View History

2021-07-02 17:36:12 +05:30
permissions:
actions: none
checks: none
contents: none
deployments: none
2022-10-21 18:02:19 +05:30
issues: write
2021-07-02 17:36:12 +05:30
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'
2022-10-16 21:18:41 +05:30
required: false
2022-10-16 19:08:57 +05:30
default: ''
2022-10-16 21:33:17 +05:30
schedule:
2022-10-26 11:58:49 +05:30
- cron: '0 1 * * *'
2022-10-16 19:08:57 +05:30
env:
VERSION: ${{ github.event.inputs.version }}
2022-10-21 18:03:15 +05:30
NEW_VERSION: ${{ null }}
2022-10-16 19:08:57 +05:30
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:
2022-10-16 19:40:57 +05:30
- name: Reclaiming disk space on / by removing dotnet/android/ghc
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
2022-10-16 19:42:50 +05:30
sudo apt-get remove google-cloud-sdk azure-cli hhvm google-chrome-stable \
2022-10-16 19:40:57 +05:30
firefox mysql-server-core-8.0 mono-devel mongodb-org-server podman mongodb-org-mongos \
powershell dotnet-runtime-3.1 dotnet-runtime-5.0 dotnet-sdk-3.1 dotnet-sdk-5.0
sudo apt-get autoremove
2022-10-16 19:11:37 +05:30
- 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 21:18:41 +05:30
- name: Check versions
shell: bash
run: |
if [ -z $VERSION ]; then
2022-10-16 21:26:31 +05:30
VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs)
2022-10-16 21:22:34 +05:30
echo "VERSION=$VERSION" >> $GITHUB_ENV
2022-10-16 21:18:41 +05:30
fi
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/.
2022-10-16 19:47:33 +05:30
docker push uazo/build-deps:$VERSION
2022-10-21 18:02:19 +05:30
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
2022-10-16 19:08:57 +05:30
fi
2022-10-16 19:47:33 +05:30
fi
2022-10-16 19:08:57 +05:30
- 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/.
2022-10-16 19:47:33 +05:30
docker push uazo/chromium:$VERSION
2022-10-21 18:02:19 +05:30
echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV
2022-10-16 19:08:57 +05:30
fi
fi
2022-10-21 18:02:19 +05:30
- name: Create issue ${{ env.VERSION }}
2022-10-21 18:06:07 +05:30
if: "${{ env.NEW_VERSION != '' }}"
2022-10-21 18:02:19 +05:30
shell: bash
run: |
2022-10-26 11:58:49 +05:30
GH=../gh_2.18.1_linux_amd64/bin/gh
2022-10-21 18:02:19 +05:30
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
tar xfz gh_2.18.1_linux_amd64.tar.gz
2022-10-26 11:58:49 +05:30
cd bromite-buildtools
2022-10-21 18:02:19 +05:30
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
$GH issue create -t "$VERSION: new stable chromium version" -b ""
2022-10-16 19:08:57 +05:30