I have a github action that runs on self-hosted runners. And we have many labels like ‘xsmall’, ‘small’, ‘large’, ‘xlarge’ etc. And all of them have a common label as well like devops. So in many github actions I have something like this
...
runs-on: [self-hosted, devops ]
...
Now this will pick any self-hosted runner with label devops. And turns out that its sometimes picking ‘xsmall’ and for my needs ‘xsmall’ doesn’t have enough memory and therefore my job throws an OOM. A simple fix would be to pick a runner that is NOT ‘xsmall’.
I tried
...
runs-on: [self-hosted, devops, small, large, xlarge ]
...
But this is not even starting because this runs-on directive is an AND
condition meaning it will pick a runner with all labels like devops, small, large, xlarge. However there is no runner like this in our org.
So is there a way to just exclude xsmall
but have the ability for my job to pick any other runner thats available? Essentially I need an OR
condition.