From 5bc536bec467ef8fd9d12d60eb48bccb3ac97703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Mon, 27 Nov 2023 16:38:14 -0300 Subject: [PATCH] ci: add musl image. It was also necessary to reorganize the env section for CI to work. --- .github/workflows/base-image.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/base-image.yml b/.github/workflows/base-image.yml index e7e2a22..53ceb6c 100644 --- a/.github/workflows/base-image.yml +++ b/.github/workflows/base-image.yml @@ -8,23 +8,26 @@ on: pull_request: -env: - TAG: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }} - REGISTRY: ghcr.io/${{ github.repository_owner }} - IMAGE: lnls-debian-11-epics-7 - SOURCE: https://github.com/${{ github.repository }} - jobs: build_and_push: runs-on: ubuntu-latest permissions: packages: write contents: read - + strategy: + matrix: + image: + - { dir: base, image: lnls-debian-11-epics-7 } + - { dir: base/musl, image: lnls-alpine-3.18-epics-7 } + env: + TAG: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }} + REGISTRY: ghcr.io/${{ github.repository_owner }} + IMAGE: ${{ matrix.image.image }} + SOURCE: https://github.com/${{ github.repository }} steps: - uses: actions/checkout@v3 - name: Build image - run: cd base && JOBS=$(nproc) docker compose build + run: cd ${{ matrix.image.dir }} && JOBS=$(nproc) docker compose build - name: Log in to registry if: github.event_name == 'push' && vars.PUSH_TO_REGISTRY == 'true' run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin