Default Docker builds to amd64
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user