Skip to content

Commit 04b3437

Browse files
JonZeollaclaude
andcommitted
fix: add Docker buildx setup and handle missing buildx gracefully
Add docker/setup-buildx-action to the Windows CI job so docker buildx is available. Also make init-docker-multiplatform skip gracefully if buildx is not available rather than failing the init task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba9e2fe commit 04b3437

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ jobs:
221221
}
222222
223223
Write-Host "Windows smoke test passed: project generated and verified successfully"
224+
- name: Setup Docker Buildx
225+
uses: docker/setup-buildx-action@v3
224226
- name: Initialize generated project
225227
shell: bash
226228
run: |

{{cookiecutter.project_name|replace(" ", "")}}/Taskfile.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ tasks:
6060
# This fixes an "ERROR: Multiple platforms feature is currently not supported for docker driver" pipeline error
6161
# Only create our multiplatform builder if it doesn't already exist; otherwise list information about the one that exists
6262
# It suppresses the inspect output when it's not running in a GitHub Action
63-
- docker buildx inspect multiplatform {{ '{{if ne .GITHUB_ACTIONS "true"}}' }}>/dev/null{{ '{{end}}' }} || docker buildx create --name multiplatform --driver docker-container --use
63+
# Skip gracefully if docker buildx is not available (e.g. Windows without buildx plugin)
64+
- |
65+
if ! docker buildx version > /dev/null 2>&1; then
66+
echo "docker buildx not available, skipping multiplatform setup"
67+
exit 0
68+
fi
69+
docker buildx inspect multiplatform {{ '{{if ne .GITHUB_ACTIONS "true"}}' }}>/dev/null{{ '{{end}}' }} || docker buildx create --name multiplatform --driver docker-container --use
6470
6571
init:
6672
desc: Initialize the repo for local use; intended to be run after git clone

0 commit comments

Comments
 (0)