Base images build #1236
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |