diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2775159 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: Build PDF + +env: + REGISTRY: ghcr.io + +jobs: + + set-vars: + runs-on: [ubuntu-latest] + outputs: + CI_IMAGE : ${{ steps.common.outputs.CI_IMAGE }} + steps: + - name: Export common variables. + id : common + run : | + echo "CI_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/latex" >> $GITHUB_OUTPUT + + build-image: + needs: [set-vars] + runs-on: [ubuntu-latest] + container: + image: docker:latest + permissions: + packages: write + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: docker/build-push-action@v5 + with: + context: . + platforms: linux-amd64 + push: true + file: dockerfile + tags: ${{ needs.set-vars.outputs.CI_IMAGE }} + cache-from: type=registry,ref=${{ needs.set-vars.outputs.CI_IMAGE }} + cache-to: type=inline + labels: "org.opencontainers.image.source=${{ github.repositoryUrl }}" + + build-pdf: + needs: [set-vars, build-image] + runs-on: [ubuntu-latest] + container: + image: ${{ needs.set-vars.outputs.CI_IMAGE }} + steps: + - uses: actions/checkout@v4 + + - run: | + make diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..02d0c27 --- /dev/null +++ b/dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:24.04 + +RUN --mount=type=bind,source=requirements.txt,target=requirements.txt <