nextstrain / .github

8 stars 11 forks source link

pathogen-repo-ci: Add input for GH Action runner #103

Open joverlee521 opened 1 month ago

joverlee521 commented 1 month ago

Based on @victorlin's proposed solution in https://github.com/nextstrain/conda-base/issues/83

In nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml, add an input to be passed to jobs.build.runs-on.

Example in https://github.com/nextstrain/.github/commit/d4fa54a815bfd1c332ee014ba4b308264f3ffee2 is built on v0, but similar changes can be made to the latest version of the pathogen-repo-ci.

joverlee521 commented 1 month ago

Seems like we can do something similar to the runtimes input

  1. Allow specifying multiple in YAML format in input

https://github.com/nextstrain/.github/blob/429f042333c3cbfd2587d2942d283a57d3d252cc/.github/workflows/pathogen-repo-ci.yaml#L46-L56

  1. Parse YAML into JSON

https://github.com/nextstrain/.github/blob/429f042333c3cbfd2587d2942d283a57d3d252cc/.github/workflows/pathogen-repo-ci.yaml#L150-L158

  1. Parse JSON into matrix for the build job

https://github.com/nextstrain/.github/blob/429f042333c3cbfd2587d2942d283a57d3d252cc/.github/workflows/pathogen-repo-ci.yaml#L167-L172

victorlin commented 1 month ago

Seems like we can do something similar to the runtimes input

+1 for this compared to my prototype which defines the list of runners on the matrix with the repo name. It makes more sense to have runners x runtimes, although the similar terminology may be confusing!