[FORGEJO] default labels to a single docker #38
|
@ -97,7 +97,7 @@ The user is `root` with password `admin1234`. The runner is registered with:
|
|||
```
|
||||
cd setup-forgejo
|
||||
docker exec --user 1000 forgejo forgejo actions generate-runner-token > forgejo-runner-token
|
||||
../runner/forgejo-runner register --no-interactive --instance "http://$(cat forgejo-ip):3000/" --name runner --token $(cat forgejo-runner-token) --labels ubuntu-latest:docker://node:16-buster,self-hosted
|
||||
../runner/forgejo-runner register --no-interactive --instance "http://$(cat forgejo-ip):3000/" --name runner --token $(cat forgejo-runner-token) --labels docker:docker://node:16-bullseye,self-hosted
|
||||
```
|
||||
|
||||
And launched in debug mode with:
|
||||
|
|
|
@ -91,10 +91,7 @@ const (
|
|||
)
|
||||
|
||||
var defaultLabels = []string{
|
||||
"ubuntu-latest:docker://node:16-bullseye",
|
||||
"ubuntu-22.04:docker://node:16-bullseye", // There's no node:16-bookworm yet
|
||||
"ubuntu-20.04:docker://node:16-bullseye",
|
||||
"ubuntu-18.04:docker://node:16-buster",
|
||||
"docker:docker://node:16-bullseye",
|
||||
}
|
||||
|
||||
type registerInputs struct {
|
||||
|
@ -162,7 +159,7 @@ func (r *registerInputs) assignToNext(stage registerStage, value string) registe
|
|||
}
|
||||
|
||||
if validateLabels(r.CustomLabels) != nil {
|
||||
log.Infoln("Invalid labels, please input again, leave blank to use the default labels (for example, ubuntu-20.04:docker://node:16-bullseye,ubuntu-18.04:docker://node:16-buster,linux_arm:host)")
|
||||
log.Infoln("Invalid labels, please input again, leave blank to use the default labels (for example, docker:docker://node:16-bullseye,linux_arm:host)")
|
||||
return StageInputCustomLabels
|
||||
}
|
||||
return StageWaitingForRegistration
|
||||
|
@ -227,7 +224,7 @@ func printStageHelp(stage registerStage) {
|
|||
hostname, _ := os.Hostname()
|
||||
log.Infof("Enter the runner name (if set empty, use hostname: %s):\n", hostname)
|
||||
case StageInputCustomLabels:
|
||||
log.Infoln("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):")
|
||||
log.Infoln("Enter the runner labels, leave blank to use the default labels (comma-separated, for example, docker:docker://node:16-bullseye,linux_arm:host):")
|
||||
case StageWaitingForRegistration:
|
||||
log.Infoln("Waiting for registration...")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue