diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aca35e1..57075d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,15 +10,27 @@ jobs: name: 🚢 Deploy runs-on: ubuntu-latest steps: - - uses: docker/setup-buildx-action@v3 - uses: actions/checkout@v4 - - uses: docker/login-action@v3 + + - name: build containerfile + id: build-image + uses: redhat-actions/buildah-build@v2 with: + image: ghcr.io/swablab/documents + tags: latest + containerfiles: | + ./Containerfile + + - name: Log in to ghcr.io + uses: redhat-actions/podman-login@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - username: ${{github.actor}} - password: ${{secrets.GITHUB_TOKEN}} - - uses: docker/build-push-action@v6 + + - name: Push to ghcr.io + uses: redhat-actions/push-to-registry@v2 with: - file: Containerfile - push: true - tags: ghcr.io/swablab/documents:latest + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: ghcr.io diff --git a/Containerfile b/Containerfile index 62d6f83..654b7e8 100644 --- a/Containerfile +++ b/Containerfile @@ -1,8 +1,8 @@ FROM docker.io/alpine:latest AS build RUN apk add typst -RUN mkdir -p /root/.local/share/fonts -RUN wget -O /root/.local/share/fonts/ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf -RUN wget -O /root/.local/share/fonts/noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf +RUN wget -O ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf +RUN wget -O noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf +ENV TYPST_FONT_PATHS=. COPY . . RUN typst c 3d-druck-agb.typ