From faaf37c95442a1b839aa0571f21b05062b426ed4 Mon Sep 17 00:00:00 2001 From: pml68 Date: Mon, 2 Dec 2024 00:20:58 +0100 Subject: feat: add "no-tex" docker image --- .github/workflows/docker.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to '.github') diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6a2f5fd..7778d04 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,6 +12,18 @@ env: jobs: push: + strategy: + matrix: + image: [ + { + dockerfile: 'Dockerfile', + tag: '' + }, + { + dockerfile: 'Dockerfile.no-tex', + tag: 'no-tex-' + }, + ] runs-on: ubuntu-latest permissions: packages: write @@ -21,7 +33,7 @@ jobs: - uses: actions/checkout@v4 - name: Build image - run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" + run: docker build . --file ${{ matrix.image.dockerfile }} --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}" - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin @@ -31,10 +43,11 @@ jobs: IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - [ "$VERSION" == "master" ] && VERSION=latest + TAG=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + [[ "${{ github.ref }}" == "refs/tags/"* ]] && TAG=$(echo $TAG | sed -e 's/^v//') + [ "$TAG" == "master" ] && TAG="latest" + TAG=${{ matrix.image.tag }}$TAG echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION + echo TAG=$TAG + docker tag $IMAGE_NAME $IMAGE_ID:$TAG + docker push $IMAGE_ID:$TAG -- cgit v1.2.3