Skip to content

Commit

Permalink
add start file
Browse files Browse the repository at this point in the history
  • Loading branch information
Joren-vanGoethem committed Oct 24, 2024
1 parent c7b9ad2 commit 6cbd759
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions github-actions-runner/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

REPO=$REPO
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/${REPO}/actions/runners/registration-token | jq .token --raw-output)

cd /home/docker/actions-runner

./config.sh --url https://github.com/${REPO} --token ${REG_TOKEN}

cleanup() {
echo "Removing runner..."
./config.sh remove --unattended --token ${REG_TOKEN}
}

trap 'cleanup; exit 130' INT
trap 'cleanup; exit 143' TERM

./run.sh & wait $!

0 comments on commit 6cbd759

Please sign in to comment.