mirror of
https://github.com/actions/actions-runner-controller.git
synced 2026-01-24 05:23:00 +08:00
23 lines
832 B
Smarty
23 lines
832 B
Smarty
{{- 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 }} |