Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use runner groups for self-hosted runners #93

Open
jeremyd2019 opened this issue Nov 8, 2024 · 6 comments
Open

use runner groups for self-hosted runners #93

jeremyd2019 opened this issue Nov 8, 2024 · 6 comments

Comments

@jeremyd2019
Copy link
Member

Runner groups are now available for everyone it seems. Not that it makes much difference with the current setup with a separate org, but good to know: https://github.blog/changelog/2024-10-17-actions-runner-groups-now-available-for-organizations-on-free-plan/

Originally posted by @lazka in #80 (comment)

@jeremyd2019
Copy link
Member Author

Unrelated note: Runner groups are now available for everyone it seems. Not that it makes much difference with the current setup with a separate org, but good to know: https://github.blog/changelog/2024-10-17-actions-runner-groups-now-available-for-organizations-on-free-plan/

I set up runner groups in the msys2-arm org, and set the windows-arm64-autobuild group to only allow msys2-arm/msys2-autobuild repository and msys2-arm/msys2-autobuild/.github/workflows/build.yml@main workflow. However, it looks like specifying a runner group works differently in the yaml:

runs-on:
  group: windows-arm64-autobuild

instead of

runs-on: ['Windows', 'ARM64', 'autobuild']

so I don't know how that would work out in the matrix...

@jeremyd2019
Copy link
Member Author

I think next week when I recreate the runners after Patch Tuesday I will try placing the autobuild runner in the group, but leaving the labels in place too and seeing what happens with still just specifying the labels in the yaml/matrix. That would at least prevent accidentally using the autobuild runner for some other repository/workflow.

@lazka
Copy link
Member

lazka commented Nov 9, 2024

I tried adding a group with the same name here, to keep things simple, but it doesn't seem to be possible to add the public runners to that group.

@jeremyd2019
Copy link
Member Author

🤷 Basically, I guess the experiment I'm planning is going to find out whether not specifying a group means "any group" (in which case it would find a runner), or "the default group" (in which case it would not). Like you said, it's not important though.

jeremyd2019 added a commit to msys2-arm/msys2-autobuild that referenced this issue Nov 13, 2024
Testing new runner instance in runner group, can github find it without a `runs-on/group` label?  msys2#93
@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Nov 13, 2024

It seems to have found the runner in the runner group without specifying a group, so I guess that's a win

image

@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Nov 13, 2024

So that means there should be nothing that needs to be done in this repository, and I can just update my setup script to select a runner group in addition to a (non-default) label.

If we can figure out how to specify the runner group in the matrix, I could get rid of the label and just put it in the group. Actually, we could just add another variable to the matrix and set it to 'Default' in every case except arm64?

runs-on:
  group: ${{ matrix.runnergroup }}
  labels: ${{ matrix.runner }}

? Think that would work? Is it even worth it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants