Open
Description
The token given by the registration endpoint is only valid for about 1 hour.
After this time limit the removal will fail (not remove runner from repository).
To fix this you need to change the removal step to something along the lines of:
remove() {
removal_url="https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPOSITORY}/actions/runners/remove-token"
echo "Requesting removal TOKEN at '${removal_url}'" # optional
payload=$(curl -sX POST -H "Authorization: token ${GITHUB_PERSONAL_TOKEN}" ${removal_url})
RUNNER_REMOVAL_TOKEN=$(echo $payload | jq .token --raw-output)
./config.sh remove --token "${RUNNER_REMOVAL_TOKEN}"
}
This will make sure that you will always have a valid token when removing the runner.
Metadata
Metadata
Assignees
Labels
No labels