Returning to use organizations.

This commit is contained in:
Alejandro Lembke Barrientos 2023-11-09 22:47:10 +00:00
parent 2440f22265
commit c75213effb
2 changed files with 4 additions and 5 deletions

View File

@ -1,3 +1,3 @@
# Docker Github Action Runner # Docker Github Action Runner
## Version 1.0.1 ## Version 1.0.2

View File

@ -1,14 +1,13 @@
#!/bin/bash #!/bin/bash
OWNER=$OWNER ORGANIZATION=$ORGANIZATION
REPO=$REPO
ACCESS_TOKEN=$ACCESS_TOKEN ACCESS_TOKEN=$ACCESS_TOKEN
REG_TOKEN=$(curl -sX POST -H "Authorization: token ${ACCESS_TOKEN}" https://api.github.com/repos/${OWNER}/${REPO}/actions/runners/registration-token | jq .token --raw-output) REG_TOKEN=$(curl -sX POST -H "Authorization: token ${ACCESS_TOKEN}" https://api.github.com/orgs/${ORGANIZATION}/actions/runners/registration-token | jq .token --raw-output)
cd /home/docker/actions-runner cd /home/docker/actions-runner
./config.sh --url https://github.com/${OWNER}/${REPO} --token ${REG_TOKEN} ./config.sh --url https://github.com/${ORGANIZATION} --token ${REG_TOKEN}
cleanup() { cleanup() {
echo "Removing runner..." echo "Removing runner..."