Wrong syntax for a workflow running for more than one operative system

Hi there!

I would like to create a matrix to run workflows on more than one runner operating system. I am using self-hosted runners and I think this is causing the issue for me (as it seems the syntax does not allow what I am trying to do. This is my workflow file:

# Pull request project linux_llvm workflow.

name: project-linux_llvm

on: [pull_request]

jobs:
  run:
    runs-on: [self-hosted, project-linux_llvm, ${{ matrix.os }}]
    strategy:
      matrix:
        os: [stretch, buster]
    if: "!contains(github.event.pull_request.title, '[skip ci]')"
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        lfs: true

The syntax is incorrect. I do not know how to accomplish this. I just want the workflow to be ran on a self-hosted runner whose tags matches the ones I am providing with the matrix.

Any idea about what’s wrong? Maybe the syntax just does not support that.

Cheers!

Me again.

Something like this did not work either:

# Pull request project linux_llvm workflow.

name: project-linux_llvm

on: [pull_request]

jobs:
  run:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: [self-hosted, project-linux_llvm, stretch]

          - os: [self-hosted, project-linux_llvm, buster]
    if: "!contains(github.event.pull_request.title, '[skip ci]')"
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        lfs: true

Thanks.

The way I wrote the workflow file above it is correct (I am sorry I said it did not worked).