The label will follow the format label[:schema[:args]], and the schema will be host if it's omitted. So
ubuntu:docker://node:18: Run jobs with label ubuntu via docker with image node:18
ubuntu:host: Run jobs with label ubuntu on the host directly.
ubuntu: Same as ubuntu:host.
ubuntu:vm:ubuntu-latest: (Just a example, not Implemented) Run jobs with label ubuntu via virtual machine with iso ubuntu-latest.
The label will follow the format `label[:schema[:args]]`, and the schema will be `host` if it's omitted. So
- `ubuntu:docker://node:18`: Run jobs with label `ubuntu` via docker with image `node:18`
- `ubuntu:host`: Run jobs with label `ubuntu` on the host directly.
- `ubuntu`: Same as `ubuntu:host`.
- `ubuntu:vm:ubuntu-latest`: (Just a example, not Implemented) Run jobs with label `ubuntu` via virtual machine with iso `ubuntu-latest`.
INFO Enter the runner name (if set empty, use hostname: Test.local):
INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-latest:docker://gitea/runner-images:ubuntu-latest):
INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster,linux_arm:host):
Previously, the only way to register a runner for running jobs on a host without containers was to use the label "self-hosted". However, this design was ill-conceived.
This limitation doesn't exists, only documentation wise.
linux_arm as labelstring is also host mode.
> Previously, the only way to register a runner for running jobs on a host without containers was to use the label "self-hosted". However, this design was ill-conceived.
This limitation doesn't exists, only documentation wise.
`linux_arm` as labelstring is also host mode.
Previously, the only way to register a runner for running jobs on a host without containers was to use the label "self-hosted". However, this design was ill-conceived.
This limitation doesn't exists, only documentation wise.
linux_arm as labelstring is also host mode.
I got it.
I noticed this problem when writing docs, since the original design of complete label is label:schema[:args].
So ubuntu:docker://node:18, and maybe ubuntu:vm:xxxx, ubuntu:cri:xxxx in the future.
That's why I think it should be ubuntu:host. The host is schema.
However, @wxiaoguang has a better idea that the schema can be optional and is "-self-hosted" by default, like label[:schema[:args]].
It makes sense, I will close this PR.
I will rewrite this PR.
> > Previously, the only way to register a runner for running jobs on a host without containers was to use the label "self-hosted". However, this design was ill-conceived.
>
> This limitation doesn't exists, only documentation wise.
>
> `linux_arm` as labelstring is also host mode.
I got it.
I noticed this problem when writing docs, since the original design of complete label is `label:schema[:args]`.
So `ubuntu:docker://node:18`, and maybe `ubuntu:vm:xxxx`, `ubuntu:cri:xxxx` in the future.
That's why I think it should be `ubuntu:host`. The `host` is schema.
However, @wxiaoguang has a better idea that the schema can be optional and is "-self-hosted" by default, like `label[:schema[:args]]`.
It makes sense, ~~I will close this PR.~~
I will rewrite this PR.
However, @wxiaoguang has a better idea that the schema can be optional and is "-self-hosted" by default, like label[:schema[:args]].
Yes this would avoid a breaking change. I had choosen to not add a new schema, because host mode doesn't need any args. However it is a valid idea to add one.
> However, @wxiaoguang has a better idea that the schema can be optional and is "-self-hosted" by default, like `label[:schema[:args]]`.
Yes this would avoid a breaking change. I had choosen to not add a new schema, because host mode doesn't need any args. However it is a valid idea to add one.
Maybe https://github.com/nektos/act/pull/1682 will get an own schema like "lxc://".
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The label will follow the format
label[:schema[:args]], and the schema will behostif it's omitted. Soubuntu:docker://node:18: Run jobs with labelubuntuvia docker with imagenode:18ubuntu:host: Run jobs with labelubuntuon the host directly.ubuntu: Same asubuntu:host.ubuntu:vm:ubuntu-latest: (Just a example, not Implemented) Run jobs with labelubuntuvia virtual machine with isoubuntu-latest.@@ -0,0 +45,4 @@}switch schema {case "docker":There is a
if len(splits) != 1 {above?@@ -0,0 +45,4 @@}switch schema {case "docker":Typo. 😂
@@ -0,0 +53,4 @@default:// It should not happen, because ParseLabel has checked it.continue}Does it need a
defaultcase? At least, show some error logs.@@ -0,0 +38,4 @@func (s *Runner) platformPicker(labels []string) string {platforms := make(map[string]string, len(s.Labels))for _, l := range s.Labels {label, schema, arg, err := ParseLabel(l)should be
make(map[string]string, len(s.Labels))?@@ -59,3 +46,3 @@INFO Enter the runner name (if set empty, use hostname: Test.local):INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-latest:docker://gitea/runner-images:ubuntu-latest):INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster,linux_arm:host):I guess it could have some more explanations about each part of the "label" .
And it looks strange that
linux_arm:hostbecomes-self-hostedThis limitation doesn't exists, only documentation wise.
linux_armas labelstring is also host mode.I got it.
I noticed this problem when writing docs, since the original design of complete label is
label:schema[:args].So
ubuntu:docker://node:18, and maybeubuntu:vm:xxxx,ubuntu:cri:xxxxin the future.That's why I think it should be
ubuntu:host. Thehostis schema.However, @wxiaoguang has a better idea that the schema can be optional and is "-self-hosted" by default, like
label[:schema[:args]].It makes sense,
I will close this PR.I will rewrite this PR.
Yes this would avoid a breaking change. I had choosen to not add a new schema, because host mode doesn't need any args. However it is a valid idea to add one.
Maybe https://github.com/nektos/act/pull/1682 will get an own schema like "lxc://".
@ChristopherHX I rewrote this PR, could you please take a look at it again.
Works perfectly fine. I see you have removed the label parsing code I had duplicated in my change.