Skip to content

Commit

Permalink
setup-nextstrain-cli: Use Docker runtime on Windows with linux/amd64 …
Browse files Browse the repository at this point in the history
…containers
  • Loading branch information
tsibley committed Feb 16, 2024
1 parent 3bcc299 commit 60d9e55
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions actions/setup-nextstrain-cli/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ inputs:
description: >-
Nextstrain runtime to configure and set as the default, as a string
understood by `nextstrain setup`. Defaults to "docker" on Linux and
"conda" on macOS (where, on GitHub Actions, Docker isn't supported). On
Windows, no runtime is set up by default: GitHub Actions runners can't run
Linux containers via WSL2 and our Conda runtime doesn't support Windows.
Windows and "conda" on macOS (where, on GitHub Actions, Docker isn't
supported).
type: string
default: ${{ runner.os == 'Linux' && 'docker' || runner.os == 'macOS' && 'conda' || '' }}
default: ${{ runner.os == 'macOS' && 'conda' || 'docker' }}
required: false

# XXX TODO: Remove this in coordination with existing callers. Callers must
Expand Down Expand Up @@ -81,6 +80,10 @@ runs:
DESTINATION: ${{ runner.temp }}/nextstrain-cli
shell: bash

- if: inputs.runtime == 'docker'
run: echo "DOCKER_DEFAULT_PLATFORM=linux/amd64" | tee -a "$GITHUB_ENV"
shell: bash

- run: nextstrain version
shell: bash

Expand Down

0 comments on commit 60d9e55

Please sign in to comment.