ec2-github-runner
ec2-github-runner copied to clipboard
stop action fails to find Github runner though the labeled runner does exist
This results in lots of offline runners piling up in our repository. The EC2 instance is killed successfully but the runner isn't removed
Run machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ***
label: shk8d
<removed for security>
aws-resource-tags: []
env:
AWS_DEFAULT_REGION: <removed>
AWS_REGION: <removed>
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
AWS EC2 instance <removed-for-security> is terminated
GitHub self-hosted runner with label shk8d is not found, so the removal is skipped
I think another possible fix for this is to just allow us to create these tagged as ephemeral runners and github will supposedly remove them automatically after 1 day (instead of 30 days)
this turned out to be a permissions problem with my github-token
. I think we would have caught this issue much sooner if this line was improved to actually show the error: https://github.com/machulav/ec2-github-runner/blob/4e0303de215db88e1c489e07a15ca4d867f488ea/src/gh.js#L16