build: add noble
as base image
#9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build Base Image | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- .github/workflows/build-base-image.yml | |
- base.Dockerfile | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: write-all | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
base_os: [buster, bullseye, bookworm, trixie, xenial, bionic, focal, jammy, noble] | |
name: Build base image on ${{ matrix.base_os }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@main | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@master | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@master | |
- name: Login to DockerHub | |
uses: docker/login-action@master | |
with: | |
username: zydou | |
password: ${{ secrets.DOCKER_PASSWD }} | |
- name: set BASE_IMG and OS_VARIANT ENV | |
run: | | |
if [[ "${{matrix.base_os}}" = "buster" || ${{matrix.base_os}} = "bullseye" || ${{matrix.base_os}} = "bookworm" || ${{matrix.base_os}} = "trixie" ]]; then | |
echo "BASE_IMG=debian" >> "${GITHUB_ENV}" | |
echo "OS_VARIANT=${{matrix.base_os}}-slim" >> "${GITHUB_ENV}" | |
echo "using base image: debian:${{matrix.base_os}}-slim" | |
else | |
echo "BASE_IMG=ubuntu" >> "${GITHUB_ENV}" | |
echo "OS_VARIANT=${{matrix.base_os}}" >> "${GITHUB_ENV}" | |
echo "using base image: ubuntu:${{matrix.base_os}}" | |
fi | |
- name: Build and push | |
uses: docker/build-push-action@master | |
with: | |
context: . | |
file: base.Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
provenance: false | |
build-args: | | |
BASE_IMG=${{env.BASE_IMG}} | |
OS_VARIANT=${{env.OS_VARIANT}} | |
cache-from: type=registry,ref=zydou/texlive:cache-${{matrix.base_os}}-baseimg | |
cache-to: type=registry,ref=zydou/texlive:cache-${{matrix.base_os}}-baseimg,mode=max | |
tags: | | |
zydou/texlive:${{matrix.base_os}}-baseimg |