Skip to content
Discussion options

You must be logged in to vote

The solution is a single - after : | e.g. : |- to tell yaml you do not want an additional newline after }}.

e.g.

jobs:
  build-wheels:
    if: |
      github.repository_owner == 'metaopt' &&
      (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) &&
      (github.event_name != 'pull_request' || !github.event.pull_request.draft)
    # https://docs.github.com/en/actions/reference/runners/github-hosted-runners
    runs-on: |-
      ${{
        (matrix.archs == 'ARM64' && 'windows-11-arm') ||
        (matrix.archs == 'aarch64' && 'ubuntu-24.04-arm') ||
        matrix.runner
      }}

And everything is fine.

GitHub Actions is probably looking for a runner with label "window…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@XuehaiPan
Comment options

Answer selected by XuehaiPan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Actions Build, test, and automate your deployment pipeline with world-class CI/CD Workflow Configuration Topics about workflow files, YAML setup, job dependencies, and general workflow configuration issues
2 participants