Skip to content

Merge pull request #48 from maxkratz/feature/update-jdk-21 #31

Merge pull request #48 from maxkratz/feature/update-jdk-21

Merge pull request #48 from maxkratz/feature/update-jdk-21 #31

name: Build and push Docker images
on:
push:
branches:
- 'main'
- '!testing/**'
- '!feature/**'
- '!hotfix/**'
jobs:
build-and-push-base:
runs-on: [ubuntu-22.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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build base
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: maxkratz/texlive:base
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-and-push-image:
# Use a self-hosted runner to circumvent 6h timeout
runs-on: [self-hosted]
needs: [build-and-push-base]
timeout-minutes: 4320
strategy:
matrix:
year: [2017, 2018, 2019, 2020, 2021, 2022, 2023]
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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.year }}
push: true
tags: maxkratz/texlive:${{ matrix.year }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
timeout-minutes: 4320
# latest is an extra build step because of buggy GitHub Actions if conditions
build-and-push-latest-image:
# Use a self-hosted runner to circumvent the small storage size of GitHub-hosted runners
runs-on: [self-hosted]
needs: [build-and-push-base]
timeout-minutes: 4320
strategy:
matrix:
year: [2024]
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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build latest image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.year }}
push: true
tags: |
maxkratz/texlive:${{ matrix.year }}
maxkratz/texlive:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7
timeout-minutes: 4320
build-and-push-image-variants:
# Use a self-hosted runner to circumvent the small storage size of GitHub-hosted runners
runs-on: [self-hosted]
needs: [build-and-push-image, build-and-push-latest-image]
strategy:
matrix:
year: [2022-gradle, 2023-gradle, 2023-python, 2024-gradle, 2024-python]
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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.year }}
push: true
tags: maxkratz/texlive:${{ matrix.year }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
# 2016 can not be built with arm64 support
build-and-push-2016-image:
# Use a self-hosted runner to circumvent 6h timeout
runs-on: [self-hosted]
needs: [build-and-push-base]
timeout-minutes: 1440
strategy:
matrix:
year: [2016]
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 Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.year }}
push: true
tags: maxkratz/texlive:${{ matrix.year }}
platforms: linux/amd64,linux/arm/v7
timeout-minutes: 4320