Skip to content

Add some colors

Add some colors #26

Workflow file for this run

# Based on
# https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-docker-images#publishing-images-to-github-packages
name: Build Docker Image
on:
workflow_dispatch:
push:
tags:
- '*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Disk Cleanup
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
docker system prune -a -f
docker builder prune -a -f
df -h
- name: Checkout repository with submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=sha,format=short
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
- name: Check Disk Usage
run: |
docker image ls
df -h
# Build Chromium
- name: Build Chromium
uses: docker/build-push-action@v5
with:
context: .
target: chromium-install
tags: chromium-install
cache-from: type=gha,scope=chromium
cache-to: type=gha,mode=min,scope=chromium
- name: Check Disk Usage
run: |
docker buildx prune --all --force
docker image ls
df -h
# Build Firefox
- name: Build Firefox
uses: docker/build-push-action@v5
with:
context: .
target: firefox-install
tags: firefox-install
cache-from: type=gha,scope=firefox
cache-to: type=gha,mode=min,scope=firefox
- name: Check Disk Usage
run: |
docker buildx prune --all --force
docker image ls
df -h
# Build OpenSSL
- name: Build OpenSSL
uses: docker/build-push-action@v5
with:
context: .
target: openssl-install
tags: openssl-install
cache-from: type=gha,scope=openssl
cache-to: type=gha,mode=min,scope=openssl
- name: Check Disk Usage
run: |
docker buildx prune --all --force
docker image ls
df -h
# Build ARMOR
- name: Build ARMOR
uses: docker/build-push-action@v5
with:
context: .
target: armor-install
tags: armor-install
cache-from: type=gha,scope=armor
cache-to: type=gha,mode=min,scope=armor
- name: Check Disk Usage
run: |
docker buildx prune --all --force
docker image ls
df -h
# Build the final image and push to registry
- name: Build final Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
push: true
target: final
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
cache-from: |
type=gha,scope=chromium
type=gha,scope=firefox
type=gha,scope=openssl
type=gha,scope=armor
cache-to: type=gha,mode=min,scope=final