[GH-ISSUE #519] Matching runs-on labels for self-hosted runners #353

Closed
opened 2026-03-01 21:42:36 +03:00 by kerem · 4 comments
Owner

Originally created by @dradetsky on GitHub (Feb 4, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/519

I'm trying to use act to run some workflows locally. However, for some reason my organization is using self-hosted runners. This means that rather than the more common runs-on key such as runs-on: ubuntu-latest, my workflow says runs-on: [self-hosted, Linux, X64, infra]. I think these are a list of labels s.t. any runner in my org's runner group which has all those labels is a valid candidate for running the workflow.

The problem is that I can't match this with -P options. Or at least, it's not clear how I'm supposed to.

I've since learned that a workaround is to write e.g. act -P self-hosted=catthehacker/ubuntu:act-latest, but this is counterintuitive and you should probably add a line of documentation.

Originally created by @dradetsky on GitHub (Feb 4, 2021). Original GitHub issue: https://github.com/nektos/act/issues/519 I'm trying to use act to run some workflows locally. However, for some reason my organization is using self-hosted runners. This means that rather than the more common `runs-on` key such as `runs-on: ubuntu-latest`, my workflow says `runs-on: [self-hosted, Linux, X64, infra]`. I think these are a list of labels s.t. any runner in my org's runner group which has all those labels is a valid candidate for running the workflow. The problem is that I can't match this with `-P` options. Or at least, it's not clear how I'm supposed to. I've since learned that a workaround is to write e.g. `act -P self-hosted=catthehacker/ubuntu:act-latest`, but this is counterintuitive and you should probably add a line of documentation.
kerem closed this issue 2026-03-01 21:42:36 +03:00
Author
Owner

@catthehacker commented on GitHub (Feb 5, 2021):

Could you explain how is this counterintuitive and what we can do to fix that?
It's mentioned in README and act --help:

  -P, --platform stringArray   custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
<!-- gh-comment-id:773938814 --> @catthehacker commented on GitHub (Feb 5, 2021): Could you explain how is this counterintuitive and what we can do to fix that? It's mentioned in README and `act --help`: ``` -P, --platform stringArray custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04) ```
Author
Owner

@github-actions[bot] commented on GitHub (Mar 8, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:792385420 --> @github-actions[bot] commented on GitHub (Mar 8, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@ap0ught commented on GitHub (Mar 8, 2021):

as a new user I ran into this same thing.
the error message I get is this.
[main.yml/A job to say hello] 🚧 Skipping unsupported platform 'self-hosted'

My first instinct is to find a way to alias self-hosted with ubuntu-latest
If this taught me how to alias or mentioned I could run with the -P option the error would be less negative.

<!-- gh-comment-id:793118058 --> @ap0ught commented on GitHub (Mar 8, 2021): as a new user I ran into this same thing. the error message I get is this. [main.yml/A job to say hello] 🚧 Skipping unsupported platform 'self-hosted' My first instinct is to find a way to alias self-hosted with ubuntu-latest If this taught me how to alias or mentioned I could run with the -P option the error would be less negative.
Author
Owner

@catthehacker commented on GitHub (Apr 2, 2021):

In my opinion act usage is quite well documented in README.md file. If you feel like something is unclear please share your thoughts or submit PR.

<!-- gh-comment-id:812280623 --> @catthehacker commented on GitHub (Apr 2, 2021): In my opinion `act` usage is quite well documented in `README.md` file. If you feel like something is unclear please share your thoughts or submit PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#353
No description provided.