0

Is there any way of changing runs-on value based on the user input from Github actions? Checked the resources and questions however could not find any suitable approach. Does anyone have a tip on this?

Here is the input field, if it is checked then the job will run on self-hosted instance otherwise, on Github instance.

enter image description here

geek
  • 51
  • 9
  • [`inputs` context is be available under `runs-on`](https://docs.github.com/en/actions/learn-github-actions/contexts#inputs-context). You can modify the input to `choice` type with values that you want to pass on. Or, alternatively, based on your custom input, you may [set the value in a separate job and use its output with `needs` context](https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs) to populate `runs-on`. – Azeem Jun 13 '23 at 17:13

0 Answers0