mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-10-05 04:09:26 +00:00
reorganized GH runner setups
This commit is contained in:
24
.github/runners/runner-arm/entrypoint.sh
vendored
Normal file
24
.github/runners/runner-arm/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
REPOSITORY=$REPO
|
||||
ACCESS_TOKEN=$GH_TOKEN
|
||||
LABELS=$RUNNER_LABELS
|
||||
|
||||
# echo "REPO ${REPOSITORY}"
|
||||
# echo "ACCESS_TOKEN ${ACCESS_TOKEN}"
|
||||
|
||||
REG_TOKEN=$(curl -X POST -H "Authorization: token ${ACCESS_TOKEN}" -H "Accept: application/vnd.github+json" https://api.github.com/repos/${REPOSITORY}/actions/runners/registration-token | jq .token --raw-output)
|
||||
|
||||
cd /home/docker/actions-runner
|
||||
|
||||
./config.sh --url https://github.com/${REPOSITORY} --token ${REG_TOKEN} --labels ${LABELS}
|
||||
|
||||
cleanup() {
|
||||
echo "Removing runner..."
|
||||
./config.sh remove --unattended --token ${REG_TOKEN}
|
||||
}
|
||||
|
||||
trap 'cleanup; exit 130' INT
|
||||
trap 'cleanup; exit 143' TERM
|
||||
|
||||
./run.sh & wait $!
|
Reference in New Issue
Block a user