Skip to content

use hacky action to free up disk for large arch image #138

use hacky action to free up disk for large arch image

use hacky action to free up disk for large arch image #138

Workflow file for this run

name: Build images
on:
workflow_dispatch: # manual trigger
schedule:
# 4AM every monday, matches upstream weekly builds on sunday
- cron: "0 4 * * MON"
push:
branches: ["main"]
permissions:
contents: read
packages: write
jobs:
base-images:
runs-on: ubuntu-24.04
strategy:
matrix:
tag:
- arch
- fedora
- ubuntu
steps:
# the arch container is really big now...
- name: Maximize build space
if: ${{ !env.ACT }}
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
remove-haskell: 'true'
- name: Checkout repository
uses: actions/checkout@v4
- name: Install newer Buildah
run: ./install-buildah-from-sid.sh
- name: Install other deps for local Act
if: ${{ env.ACT }}
run: |
apt install -y podman
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ github.repository }}
tags: ${{ matrix.tag }}
context: ${{ matrix.tag }}
containerfiles: ./${{ matrix.tag }}/Containerfile
- name: Push To GHCR
uses: redhat-actions/push-to-registry@main
id: push-ghcr
with:
registry: ghcr.io
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
username: ${{ github.actor }}
password: ${{ github.token }}
# try to extra-compress layers since these are big images
extra-args: |
--compression-format=zstd
--compression-level=20
deriv-images:
runs-on: ubuntu-24.04
needs: base-images
strategy:
matrix:
tag:
- zed
- vr
steps:
# the arch container is really big now...
- name: Maximize build space
if: ${{ !env.ACT }}
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
remove-haskell: 'true'
- name: Checkout repository
uses: actions/checkout@v4
- name: Install newer Buildah
run: ./install-buildah-from-sid.sh
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ github.repository }}
tags: ${{ matrix.tag }}
context: ${{ matrix.tag }}
containerfiles: ./${{ matrix.tag }}/Containerfile
- name: Push To GHCR
uses: redhat-actions/push-to-registry@main
id: push-ghcr
with:
registry: ghcr.io
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
username: ${{ github.actor }}
password: ${{ github.token }}
# try to extra-compress layers since these are big images
extra-args: |
--compression-format=zstd
--compression-level=20