chore: update comments

This commit is contained in:
Jason Song
2024-03-29 10:25:41 +08:00
parent 3a18c868b5
commit a7b1499fae
5 changed files with 7 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ runner:
# The interval for fetching the job from the Gitea instance.
fetch_interval: 2s
# The labels of a runner are used to determine which jobs the runner can run, and how to run them.
# Like: ["macos-arm64:host", "ubuntu-latest:docker://node:16-bullseye", "ubuntu-22.04:docker://node:16-bullseye"]
# Like: ["macos-arm64:host", "ubuntu-latest:docker://node:18-bookworm", "ubuntu-22.04:docker://node:18-bookworm"]
# If it's empty when registering, it will ask for inputting labels.
# If it's empty when execute `deamon`, will use labels in `.runner` file.
labels: []

View File

@@ -55,7 +55,6 @@ func (l Labels) PickPlatform(runsOn []string) string {
switch label.Schema {
case SchemeDocker:
// "//" will be ignored
// TODO maybe we should use 'ubuntu-18.04:docker:node:16-buster' instead
platforms[label.Name] = strings.TrimPrefix(label.Arg, "//")
case SchemeHost:
platforms[label.Name] = "-self-hosted"
@@ -80,7 +79,7 @@ func (l Labels) PickPlatform(runsOn []string) string {
// So the runner receives a task with a label that the runner doesn't have,
// it happens when the user have edited the label of the runner in the web UI.
// TODO: it may be not correct, what if the runner is used as host mode only?
return "node:16-bullseye"
return "node:18-bookworm"
}
func (l Labels) Names() []string {