Skip to content

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

Answered by weide-zhou
jeran7x asked this question in Actions
Discussion options

You must be logged in to vote

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.

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

Currently there’s no option to define jobs running all your jobs, if you’d like the f…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants