Skip to content

Use env.RUNNER_ENVIRONMENT to check runner type - #166

Merged
ajschmidt8 merged 1 commit into
rapidsai:branch-23.12from
jjacobelli:fix-gh-runner-cond
Oct 25, 2023
Merged

Use env.RUNNER_ENVIRONMENT to check runner type#166
ajschmidt8 merged 1 commit into
rapidsai:branch-23.12from
jjacobelli:fix-gh-runner-cond

Conversation

@jjacobelli

@jjacobelli jjacobelli commented Oct 25, 2023

Copy link
Copy Markdown
Contributor

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

Signed-off-by: Jordan Jacobelli <jjacobelli@nvidia.com>
@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
@jjacobelli
jjacobelli deleted the fix-gh-runner-cond branch October 26, 2023 11:23
@trxcllnt

trxcllnt commented Feb 2, 2024

Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
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

trxcllnt commented Feb 2, 2024

Copy link
Copy Markdown
Collaborator

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

@trxcllnt

trxcllnt commented Feb 5, 2024

Copy link
Copy Markdown
Collaborator

@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