Default Docker builds to amd64

This commit is contained in:
2026-07-18 18:56:45 -04:00
parent 1b84df88c6
commit f77d23fab4
2 changed files with 20 additions and 4 deletions
+9 -4
View File
@@ -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 }}
+11
View File
@@ -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: