16 lines
722 B
Plaintext
16 lines
722 B
Plaintext
|
#!/command/with-contenv bashio
|
||
|
# shellcheck shell=bash
|
||
|
# ==============================================================================
|
||
|
# Home Assistant Community Add-on: Example
|
||
|
# Example init script, runs before any other service
|
||
|
# ==============================================================================
|
||
|
|
||
|
bashio::log.info "register act_runner !"
|
||
|
|
||
|
# Load configuration from Home Assistant
|
||
|
GITEA_URL=$(bashio::config 'gitea_url')
|
||
|
GITEA_TOKEN=$(bashio::config 'gitea_token')
|
||
|
RUNNER_NAME=$(bashio::config 'runner_name')
|
||
|
RUNNER_LABEL=$(bashio::config 'runner_label')
|
||
|
|
||
|
exec /usr/local/bin/act_runner register --no-interactive --instance ${GITEA_URL} --token ${GITEA_TOKEN} --name ${RUNNER_NAME} --labels ${RUNNER_LABEL}
|