Can i create a workflow which runs on all of by self-hosted runners ?

Is there a way to run a workflow say a cleanup or a setup task to run on all of my available self-hosted actions runner. Not just the first one which is available.

If there is no option right now, then can we have that as a feature request please. Think this would be an use-case for most people using self-hosted runners.

Hi @jeran7x ,

The self-hosted runners will be invoked depending on your job load.

You can create a common/same custom label for your self-hosted runners, use matrix to define how many runners you want to invoke.

Note: if you’d like all of runner, specify more(or same) matrix values than runner number.

code sample as below, if you have 3 self-hosted runners, it will invoke them all.

   runs-on: [label-1] # common label for my self-hosted runners.
       testversion: [3.7, 3.8, 3.9]
      - name: test
        run: |
          echo ${{ matrix.testversion }}

Currently there’s no option to define jobs running all your jobs, if you’d like the function, you can raise a feature_request ticket here where github product manager will take a review.


1 Like

I am ok with the workaround we have for now. Thanks this helps my case :slight_smile: