From f77d23fab494bc555ef9611e237a9710acf238ae Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Sat, 18 Jul 2026 18:56:45 -0400 Subject: [PATCH] Default Docker builds to amd64 --- .gitea/workflows/docker-publish.yml | 13 +++++++++---- README.md | 11 +++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/docker-publish.yml b/.gitea/workflows/docker-publish.yml index 4b1b668..c5aa51b 100644 --- a/.gitea/workflows/docker-publish.yml +++ b/.gitea/workflows/docker-publish.yml @@ -11,14 +11,14 @@ on: workflow_dispatch: inputs: platforms: - description: "Target platforms to build (comma-separated)" + description: "Target platforms, comma-separated. Adding an arm target needs a privileged runner." required: false - default: "linux/amd64,linux/arm64" + default: "linux/amd64" env: REGISTRY: ghcr.io IMAGE_NAME: sirblobby/typstdrive - DEFAULT_PLATFORMS: "linux/amd64,linux/arm64" + DEFAULT_PLATFORMS: "linux/amd64" jobs: build-and-push: @@ -28,7 +28,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Resolve target platforms + id: platforms + run: echo "value=${{ github.event.inputs.platforms || env.DEFAULT_PLATFORMS }}" >> "$GITHUB_OUTPUT" + - name: Set up QEMU + if: contains(steps.platforms.outputs.value, 'arm') uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -59,7 +64,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: ${{ github.event.inputs.platforms || env.DEFAULT_PLATFORMS }} + platforms: ${{ steps.platforms.outputs.value }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 39fa373..1f1fa9f 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,17 @@ The Gitea publish workflow needs two repository secrets, since Gitea's built-in Set the image name with the `IMAGE_NAME` variable at the top of the workflow if you publish somewhere other than `ghcr.io/sirblobby/typstdrive`. +The Gitea runner needs access to the Docker daemon from inside job containers. In the runner's `config.yaml`: + +```yaml +container: + privileged: true + # Must not be "-", which disables the daemon socket inside jobs. + docker_host: "" +``` + +Builds target `linux/amd64` by default. Other architectures build under emulation and require `privileged: true`; pass them through the `platforms` input when running the workflow manually. + ## Contributing & Local Development Clone the official Typst compiler into the `typst/` folder before building the backend: