From 60859492caca3cc58e4af301da7f8baddd9af923 Mon Sep 17 00:00:00 2001 From: NotXia <35894453+NotXia@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:15:27 +0200 Subject: [PATCH] Add image for LaTex --- .github/workflows/notes-registry.yml | 49 ++++++++++++++++++++++++++++ Dockerfile | 9 +++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/notes-registry.yml create mode 100644 Dockerfile diff --git a/.github/workflows/notes-registry.yml b/.github/workflows/notes-registry.yml new file mode 100644 index 0000000..e3177b3 --- /dev/null +++ b/.github/workflows/notes-registry.yml @@ -0,0 +1,49 @@ +name: Create and publish Docker image + +on: + push: + branches: + - main + paths: [ + Dockerfile + ] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Container registry login + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push image + id: push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4a67566 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM archlinux:latest + +WORKDIR /notes + +RUN pacman --noconfirm -Sy +RUN pacman --noconfirm -S git +RUN pacman --noconfirm -S texlive-basic texlive-latex texlive-binextra texlive-mathscience texlive-latexextra texlive-fontsextra texlive-bibtexextra biber + +CMD ["bash", "./utils/compile.sh", "./src", "./.compiled", "./.currpdfs"] \ No newline at end of file