sbt-github-actions
sbt-github-actions copied to clipboard
Support setting OS (runs-on) for publish job
What
Could you/we add support for changing the runs-on setting for the publish job too?
Why
For self-hosted runners, you need to set a custom githubWorkflowOSes. It then gets set on the build job, but not on the publish job (as you've documented in the Readme).
However, since we have a private Maven repo (Nexus), we'd like to be able to publish into that using our self-hosted runners.
What if we make this behave similarly to githubWorkflowJavaVersions, where the very first one in the list is used for the publication job?
Yes, that's fine. 👍
Longer-term maybe we could revisit the "OSes" concept/abstraction, since it doesn't align entirely with how labels work for GHA runners (especially self-hosted).
See "custom labels" here to see what I mean: https://help.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
Longer-term maybe we could revisit the "OSes" concept/abstraction, since it doesn't align entirely with how labels work for GHA runners (especially self-hosted).
Oh this is interesting! I wasn't aware of the deeper details of runners. I agree the "OSes" abstraction needs revisiting. If you have some ideas on what this should look like, please open a new issue and hold forth! I can't promise I'll get to it right away, but getting it into issue form ensures that I'll eventually loop back to it.
Yes, that's fine. +1
Longer-term maybe we could revisit the "OSes" concept/abstraction, since it doesn't align entirely with how labels work for GHA runners (especially self-hosted).
See "custom labels" here to see what I mean: https://help.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
Yes, this is also what motivated the patch I recently sent.
we have selection labels like:
'self-hosted', 'teamA', 'teamB' that we use basically for accounting on which team gets billed for the runner hours; and that has nothing to do with the 'OS' or even the matrix generation for test running...
with the patch I am able to have 'run-on' combinations that both participate in the matrix, and do not participate in the matrix but allow me to specify the additional filter.. see #16
with the patch I am able to have 'run-on' combinations that both participate in the matrix, and do not participate in the matrix but allow me to specify the additional filter.. see #16
Ah, so #16 does what I want (not filtering runners on operating system but runner labels, solving filtering on the self-hosted label in my case), but only for the Build step and not the Publish step.
@MPV yeah, it is a different enough concern in any case. I guess eventually people decide to turn off the validation and maintain the github action by hand :/
I guess there is a line after which its dimishing returns to remap all of gh actions in sbt ...
but only for the Build step and not the Publish step.
The publish step should be doable as well with a little work. Sorry this has been a bit far down my queue to look at, but I definitely do consider it in scope.