sbt-github-actions icon indicating copy to clipboard operation
sbt-github-actions copied to clipboard

Support setting OS (runs-on) for publish job

Open MPV opened this issue 5 years ago • 7 comments

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.

MPV avatar Jun 05 '20 13:06 MPV

What if we make this behave similarly to githubWorkflowJavaVersions, where the very first one in the list is used for the publication job?

djspiewak avatar Jun 05 '20 15:06 djspiewak

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

MPV avatar Jun 06 '20 09:06 MPV

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.

djspiewak avatar Jun 07 '20 19:06 djspiewak

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

kryptt avatar Sep 03 '20 11:09 kryptt

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 avatar Oct 20 '20 04:10 MPV

@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 ...

kryptt avatar Oct 20 '20 07:10 kryptt

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.

djspiewak avatar Oct 27 '20 03:10 djspiewak