...

Text file src/edge-infra.dev/hack/build/edge-golden-image/startup_script.sh

Documentation: edge-infra.dev/hack/build/edge-golden-image

     1#!/usr/bin/env bash
     2
     3sudo chmod 666 /var/run/docker.sock
     4
     5cd /opt/github/actions-runner || exit
     6
     7gh_ea_token=$(gcloud secrets versions access "latest" --secret="ea-sports-github-token")
     8gh_registration_token=$(curl -X POST -u "$gh_ea_token":x-oauth-basic https://api.github.com/orgs/ncrvoyix-swt-retail/actions/runners/registration-token | jq -r '.token')
     9name="$(hostname)-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c10)"
    10./config.sh --unattended --url https://github.com/ncrvoyix-swt-retail --runnergroup edge-runner-2 --labels edge-runner-2 --token "$gh_registration_token" --name "$name"
    11sudo ./svc.sh install
    12sudo ./svc.sh start

View as plain text