You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm developing a script that runs either locally or in github action, I may want to detect whether it is running in github action environment, because some functions in github-action-utils is unusable locally.
Although I can detect the environment by using try-catch, I still want a more Pythonic solution in the github-action-utils module. For example, a is_github_action() function that returns a bool.
The text was updated successfully, but these errors were encountered:
oxygen-dioxide
changed the title
Detect if the script in running in github action environment
Detect if the script is running in github action environment
Mar 13, 2023
You can use GITHUB_ACTIONS or CI (Always set to true when GitHub Actions is running the workflow. You can use this variable to differentiate when tests are being run locally or by GitHub Actions.) environment variables to check if you code is running locally or via GitHub Actions.
If I'm developing a script that runs either locally or in github action, I may want to detect whether it is running in github action environment, because some functions in github-action-utils is unusable locally.
Although I can detect the environment by using try-catch, I still want a more Pythonic solution in the github-action-utils module. For example, a
is_github_action()
function that returns a bool.The text was updated successfully, but these errors were encountered: