-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-hosted runner cleanup: use Ubuntu instead of azure/cli action #96
Conversation
@dscho I need some help here regarding the Azure Credentials. Currently, you have an {
"clientSecret": "******",
"subscriptionId": "******",
"tenantId": "******",
"clientId": "******"
} If we want to invoke
Would it be possible for you to set up those secrets? If not (or if it's too much work to do), I can most likely just extract the individual values from the JSON using WDYT? Also, here's a sample run, which obviously failed because of the missing secrets. |
That's too bad... the problem is that the JSON is produced when registering with Azure, and I'd like to keep it copy-pasteable. How about using a |
9ef3dab
to
a3a3cc3
Compare
The `azure/cli` GitHub Action runs in a Docker container with Alpine or Azure Linux, meaning that many tools like `node` and `gh` (which we rely on) aren't available. Since the Azure CLI is available in the GitHub-hosted `ubuntu-latest` image anyway, let's leverage that instead. In the end, it has all the other tools we need as well. Ref: https://github.com/actions/runner-images/blob/ce2a3e8e67858dc8c3dd77aca6b29e2956d934ed/images/ubuntu/Ubuntu2404-Readme.md?plain=1#L105 Signed-off-by: Dennis Ameling <[email protected]>
It doesn't make sense to run this scheduled job on forks, because they don't have the required secrets. Signed-off-by: Dennis Ameling <[email protected]>
a3a3cc3
to
72a1b0d
Compare
@dscho great suggestion! I've applied the changes. Here's a successful workflow run. Starting another workflow run confirmed that no VMs are left after the cleanup 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
The
azure/cli
GitHub Action runs in a Docker container with Alpine or Azure Linux, meaning that many tools likenode
andgh
(which we rely on) aren't available.Since the Azure CLI is available in the GitHub-hosted
ubuntu-latest
image anyway, let's leverage that instead. In the end, it has all the other tools we need as well.Ref: https://github.com/actions/runner-images/blob/ce2a3e8e67858dc8c3dd77aca6b29e2956d934ed/images/ubuntu/Ubuntu2404-Readme.md?plain=1#L105