#!/bin/bash set -e # Auto-register if no config exists and env vars are provided if [ ! -f /etc/gitlab-runner/config.toml ] && \ [ -n "${CI_SERVER_URL}" ] && [ -n "${REGISTRATION_TOKEN}" ]; then gitlab-runner register \ --non-interactive \ --url "${CI_SERVER_URL}" \ --registration-token "${REGISTRATION_TOKEN}" \ --executor shell \ --shell bash \ --description "${RUNNER_NAME:-asteria-qt-runner}" \ --tag-list "${RUNNER_TAGS:-}" \ --run-untagged="${RUNNER_RUN_UNTAGGED:-true}" \ --locked="${RUNNER_LOCKED:-false}" fi exec gitlab-runner run --working-directory=/builds