Clarify labels #69
No reviewers
Labels
No Label
kind
bug
kind
build
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
No Milestone
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#69
Loading…
Reference in New Issue
No description provided.
Delete Branch "wolfogre/act_runner:feature/host_mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The label will follow the format
label[:schema[:args]]
, and the schema will behost
if it's omitted. Soubuntu:docker://node:18
: Run jobs with labelubuntu
via docker with imagenode:18
ubuntu:host
: Run jobs with labelubuntu
on the host directly.ubuntu
: Same asubuntu:host
.ubuntu:vm:ubuntu-latest
: (Just a example, not Implemented) Run jobs with labelubuntu
via virtual machine with isoubuntu-latest
.@ -45,1 +45,4 @@
if len(splits) != 1 {
continue
}
if len(splits) == 1 {
There is a
if len(splits) != 1 {
above?@ -48,3 +45,4 @@
if len(splits) != 2 {
continue
}
// ["ubuntu-18.04", "docker://node:16-buster"]
Typo. 😂
@ -57,0 +53,4 @@
// TODO "//" will be ignored, maybe we should use 'ubuntu-18.04:docker:node:16-buster' instead
platforms[k] = strings.TrimPrefix(strings.TrimPrefix(v, "docker:"), "//")
case v == "host":
platforms[k] = "-self-hosted"
Does it need a
default
case? At least, show some error logs.@ -39,3 +39,3 @@
// "self-hosted"
// "linux_arm:host"
platforms := make(map[string]string, len(labels))
should be
make(map[string]string, len(s.Labels))
?@ -46,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, self-hosted,ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster):
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:host
becomes-self-hosted
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 maybeubuntu:vm:xxxx
,ubuntu:cri:xxxx
in the future.That's why I think it should be
ubuntu:host
. Thehost
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.
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://".
Redesign host modeto Clarify labels@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.