Check build of docker image #224
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: Check build of docker image | |
on: | |
schedule: | |
# 1h later than publish.yml | |
- cron: '1 3 1,15 * *' | |
push: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
steps: | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver-opts: network=host | |
- | |
name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- | |
name: Build | |
id: docker_build | |
uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: localhost:5000/name/app:latest | |
- | |
name: lacheck | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest lacheck minimal-article.tex | |
- | |
name: chktex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest chktex minimal-article.tex | |
- | |
name: latexindent | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest latexindent minimal-article.tex | |
- | |
name: minimal-article.tex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest pdflatex minimal-article.tex | |
- | |
name: minimal-codehigh.tex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest lualatex minimal-codehigh.tex | |
- | |
name: minimal-minted.tex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest pdflatex --shell-escape minimal-minted.tex | |
- | |
name: minimal-plantuml.tex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest lualatex --shell-escape minimal-plantuml.tex | |
- | |
name: minimal-selnolig.tex | |
working-directory: test | |
run: | | |
docker run -v $(pwd):/workdir localhost:5000/name/app:latest lualatex minimal-selnolig.tex | |
- | |
# Test compilation of a .tex file referencing a .tex file in a parent directory. | |
# Issue: https://github.com/dante-ev/docker-texlive/issues/39 | |
name: current-file.tex | |
working-directory: test/subdir1 | |
run: | | |
docker run -v $(pwd)/..:/workdir localhost:5000/name/app:latest /bin/bash -c "cd subdir1 && lualatex current-file.tex" | |
- name: Archive PDFs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pdfs | |
path: | | |
test/**/*.pdf |