Migrate to lualatex #30
Workflow file for this run
This file contains hidden or 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 Document | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| inputs: | |
| skip_release: | |
| type: boolean | |
| description: Do not create a release from this run | |
| default: false | |
| env: | |
| REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| IMAGE_NAME: thesis-builder | |
| jobs: | |
| build-and-push-image: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check for Docker changes | |
| id: changes | |
| run: | | |
| if git diff --name-only $(git describe --abbrev=0 --tags $(git describe --abbrev=0)^) $(git describe --abbrev=0) | grep '^\.devcontainer/Dockerfile'; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Log in to Container registry | |
| if: ${{ steps.changes.outputs.changed == 'true' }} | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata for Docker | |
| if: ${{ steps.changes.outputs.changed == 'true' }} | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| - name: Set up Docker Buildx | |
| if: ${{ steps.changes.outputs.changed == 'true' }} | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| if: ${{ steps.changes.outputs.changed == 'true' }} | |
| id: push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| file: .devcontainer/Dockerfile | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Generate artifact attestation | |
| if: ${{ steps.changes.outputs.changed == 'true' }} | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true | |
| build-latex: | |
| runs-on: ubuntu-24.04 | |
| needs: build-and-push-image | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run latexmk | |
| run: | | |
| ./build.sh -w ${{ github.workspace }} | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ ! github.event.inputs.skip_release }} | |
| with: | |
| name: Release ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: | | |
| dist/*.pdf |