Name build differently based on matrix OS in GitHub Actions?

Viewed 132

Running in a different OS, but actually macOS: https://github.com/vmactions/solaris-vm

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, macos-10.15]

    name: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v2
      - name: SunOS deps
        id: build_test
        uses: vmactions/solaris-vm@v0.0.3
        with:
          prepare: pkgutil -y -i cmake
        if: matrix.os == 'macos-10.15'

Which makes:

GitHub actions sidebar

How do I make it appear as "SunOS" then "macOS" in the sidebar?

1 Answers

How about making name like this:

name: ${{ matrix.os == 'macos-10.15' && 'SunOS' || matrix.os }}
Related