Skip to content

Base images build

Base images build #97

Workflow file for this run

name: Base images build
on:
schedule:
- cron: '0 3 * * *' # 3 AM UTC = before the nightly build
workflow_dispatch: # Manual trigger
jobs:
base-image-build:
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'shipwright-io/build' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- base
- git
- image-processing
- waiter
# We cannot run in parallel because the base image must be built first
max-parallel: 1
steps:
- uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to container registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u ${{ github.repository_owner }} --password-stdin ghcr.io
- name: Build Image
working-directory: images/${{ matrix.image }}
run: |
NAMESPACE=$(tr '[:upper:]' '[:lower:]' <<<${{ github.repository_owner }})
IMAGE=ghcr.io/${NAMESPACE}/base-${{ matrix.image }} NAMESPACE="${NAMESPACE}" docker buildx bake --push -f ../docker-bake.hcl