axodotdev / axodotdev/cargo-dist
`github-custom-runners` does not support arrays
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
[According to the GHA docs](https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#overview)
> You can provide runs-on as:
>
> - A single string
> - A single variable containing a string
> - An array of strings, variables containing strings, or a combination of both
> - A key: value pair using the group or labels keys
>
> If you specify an array of strings or variables, your workflow will execute on any runner that matches all of the specified runs-on values.
but currently using the following will fail
```toml
[build.github-custom-runners]
x86_64-unknown-linux-gnu = ["self-hosted", "linux", "x64", "gpu"]
```
will fail with the following output
```shellsession
cargo dist generate
× failed to parse TOML
╰─▶ TOML parse error at line 20, column 28
|
20 | x86_64-unknown-linux-gnu = ["self-hosted", "linux", "x64", "gpu"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
data did not match any variant of untagged enum StringLikeOr
╭─[/Users/rfm/projects/changelog-builder/dist-workspace.toml:20:28]
19 │ [dist.github-custom-runners]
20 │ x86_64-unknown-linux-gnu = ["self-hosted", "linux", "x64", "gpu"]
· ──────────────────────────────────────
╰────
```
Contributor guide
Research direction
Start by tracing how [build.github-custom-runners] is parsed and inspect the StringLikeOr type named in the error. Reproduce the failure with the provided TOML, then verify that an array of runner labels is accepted by running cargo dist generate and checking the generated workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, rust
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100