mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-24 13:32:35 +08:00
wip
This commit is contained in:
23
charts/gha-runner-scale-set-dev/templates/_defaults.tpl
Normal file
23
charts/gha-runner-scale-set-dev/templates/_defaults.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- define "runner.image" -}}
|
||||
{{- $runner := .Values.runner.container | default dict -}}
|
||||
{{- if not (kindIs "map" $runner) -}}
|
||||
{{- fail "runner.container must be a map/object" -}}
|
||||
{{- end -}}
|
||||
{{- $image := $runner.image | default "ghcr.io/actions/actions-runner:latest" -}}
|
||||
{{- if not (kindIs "string" $image) -}}
|
||||
{{- fail "runner.container.image must be a string" -}}
|
||||
{{- end -}}
|
||||
{{- $image }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "runner.command" -}}
|
||||
{{- $runner := .Values.runner.container | default dict -}}
|
||||
{{- if not (kindIs "map" $runner) -}}
|
||||
{{- fail "runner.container must be a map/object" -}}
|
||||
{{- end -}}
|
||||
{{- $command := $runner.command | default (list "/home/runner/run.sh") -}}
|
||||
{{- if not (kindIs "slice" $command) -}}
|
||||
{{- fail "runner.container.command must be a list/array" -}}
|
||||
{{- end -}}
|
||||
{{- toJson $command -}}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user