Image Builder #576
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: Image Builder | |
on: | |
workflow_dispatch: | |
inputs: | |
pandoc_version: | |
description: >- | |
Pandoc version; must be either `main` or a release number | |
default: main | |
type: string | |
base_system: | |
description: Docker base system | |
default: alpine | |
type: choice | |
options: | |
- alpine | |
- ubuntu | |
- static | |
schedule: | |
- cron: '33 6 * * 1,4' | |
jobs: | |
# Build images and store them as tar archive | |
core: | |
name: minimal and core | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
version: "lab:latest" | |
driver: cloud | |
endpoint: "pandoc/multiarch" | |
- name: minimal | |
uses: ./.github/actions/build | |
with: | |
image_type: minimal | |
base_system: ${{ inputs.base_system }} | |
pandoc_version: ${{ inputs.pandoc_version }} | |
dockerfile: ${{ inputs.base_system }}/Dockerfile | |
target: ${{ inputs.base_system }}-minimal | |
- name: core | |
uses: ./.github/actions/build | |
if: ${{ inputs.base_system != 'static' }} | |
with: | |
image_type: core | |
base_system: ${{ inputs.base_system }} | |
pandoc_version: ${{ inputs.pandoc_version }} | |
dockerfile: ${{ inputs.base_system }}/Dockerfile | |
target: ${{ inputs.base_system }}-core | |
typst: | |
name: Typst | |
if: ${{ inputs.base_system != 'static' }} | |
needs: core | |
uses: ./.github/workflows/addon.yaml | |
secrets: inherit | |
with: | |
addon: typst | |
base_system: ${{ inputs.base_system }} | |
pandoc_version: ${{ inputs.pandoc_version }} | |
latex: | |
name: LaTeX | |
if: ${{ inputs.base_system != 'static' }} | |
needs: core | |
uses: ./.github/workflows/addon.yaml | |
secrets: inherit | |
with: | |
addon: latex | |
base_system: ${{ inputs.base_system }} | |
pandoc_version: ${{ inputs.pandoc_version }} | |
extra: | |
name: Extra | |
needs: latex | |
uses: ./.github/workflows/addon.yaml | |
secrets: inherit | |
with: | |
addon: extra | |
base_system: ${{ inputs.base_system }} | |
pandoc_version: ${{ inputs.pandoc_version }} |