Skip to content
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

Use env.RUNNER_ENVIRONMENT to check runner type #166

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

jjacobelli
Copy link
Contributor

@jjacobelli jjacobelli commented Oct 25, 2023

Instead of checking if the runner name contains linux-, we now check the value of env.RUNNER_ENVIRONMENT. This value should be github-hosted for GitHub runners and self-hosted for RAPIDS runners.

Test pipeline: https://github.com/rapidsai/devcontainers/actions/runs/6639045230?pr=166

@jjacobelli jjacobelli force-pushed the fix-gh-runner-cond branch 2 times, most recently from ab852a0 to f5c15e3 Compare October 25, 2023 10:54
@jjacobelli jjacobelli marked this pull request as ready for review October 25, 2023 10:54
@ajschmidt8 ajschmidt8 merged commit 87a9a2c into rapidsai:branch-23.12 Oct 25, 2023
18 checks passed
@jjacobelli jjacobelli deleted the fix-gh-runner-cond branch October 26, 2023 11:23
@trxcllnt
Copy link
Collaborator

trxcllnt commented Feb 2, 2024

@jjacobelli it doesn't look like github-hosted runners set the env.RUNNER_ENVIRONMENT variable.

Is this something we only do in our self-hosted runners, or did something about the github-hosted runners change? I thought the env context propagates to actions, but I could also be mistaken.

@jjacobelli
Copy link
Contributor Author

Hey @trxcllnt, I just checked a workflow running on our runners and the variable is still defined:
image
That's not something we manually set on our side so maybe GH changed something on their runners?

@trxcllnt
Copy link
Collaborator

trxcllnt commented Feb 2, 2024

Ok, I'll change the checks to if: ${{ env.RUNNER_ENVIRONMENT == 'self-hosted' }}

@trxcllnt
Copy link
Collaborator

trxcllnt commented Feb 5, 2024

@jjacobelli It doesn't seem like env.RUNNER_ENVIRONMENT is defined in our runners. I even made sure to pass it in from the calling workflow, just in case something changed like actions don't inherit the workflow environment. What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants