From b6a800cc2d94f1e5196374be16be92b33a1376dc Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Wed, 21 Oct 2026 09:55:28 +0200 Subject: [PATCH] chore: build four base image variants nightly --- .github/workflows/cron.yml | 76 ++++++++++++++++++++++---------------- base.Dockerfile | 3 +- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 41e3cd8663..204e43036b 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,39 +1,53 @@ +name: Build base images + on: workflow_dispatch: schedule: - - cron: '30 4 * * *' + - cron: '30 4 * * *' jobs: Base: - runs-on: "ubuntu-latest" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "NumaryBot" - password: ${{ secrets.NUMARY_GITHUB_TOKEN }} - - name: Build and Push Base - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm64 - push: true - context: . - file: ./base.Dockerfile + name: Base (${{ matrix.tag }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - tag: '22.04' + target: base + ubuntu-version: '22.04' + - tag: '24.04' target: base - tags: ghcr.io/formancehq/base:22.04 - - name: Build and Push Scratch - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm64 - push: true - context: . - file: ./base.Dockerfile + ubuntu-version: '24.04' + - tag: '26.04' + target: base + ubuntu-version: '26.04' + - tag: scratch target: scratch - tags: ghcr.io/formancehq/base:scratch + ubuntu-version: '24.04' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: NumaryBot + password: ${{ secrets.NUMARY_GITHUB_TOKEN }} + - name: Build and Push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + pull: true + no-cache: true + context: . + file: ./base.Dockerfile + target: ${{ matrix.target }} + build-args: | + UBUNTU_VERSION=${{ matrix.ubuntu-version }} + tags: ghcr.io/formancehq/base:${{ matrix.tag }} diff --git a/base.Dockerfile b/base.Dockerfile index d32f3afc99..43ca526731 100644 --- a/base.Dockerfile +++ b/base.Dockerfile @@ -1,4 +1,5 @@ -FROM ubuntu:24.04 AS base +ARG UBUNTU_VERSION=24.04 +FROM ubuntu:${UBUNTU_VERSION} AS base RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates curl tzdata && rm -rf /var/lib/apt/lists/* FROM alpine:3.22 AS certs