aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml27
1 files changed, 20 insertions, 7 deletions
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