Skip to content

Conversation

@sebastianrath
Copy link
Member

This PR enables fixes a few quirks where mimicking a GitHub environment didn't correctly work, if the graph was started from a browser session. This also changed the way which env vars are respected from which source.

GITHUB_TOKEN

  1. opts.OverrideSecrets["GITHUB_TOKEN"] (highest)
  2. opts.OverrideEnv["GITHUB_TOKEN"]
  3. os.Getenv("GITHUB_TOKEN")
  4. os.Getenv("INPUT_TOKEN") (lowest)

GITHUB_ACTIONS

  1. opts.OverrideEnv["GITHUB_ACTIONS"]
  2. os.Getenv("GITHUB_ACTIONS")
  3. Entry node is core/gh-start@v1 (implicit)

GITHUB_WORKSPACE

  1. opts.OverrideEnv["GITHUB_WORKSPACE"]
  2. os.Getenv("GITHUB_WORKSPACE")

Mimic GitHub Environment Detection

So when running outside of a real GitHub Actions runner, the system checks if it needs to simulate a GitHub environment. This happens when two things are true.

  • (1) isGitHubActions is true if either defined in the config panel of the app editor, or defined via .env or shell var (ignored if defined in a config file).
  • (2) All of these environment variables are not set (because its unlikely that a user sets all of these):
    • GITHUB_RUN_ID
    • RUNNER_TEMP
    • GITHUB_API_URL
    • GITHUB_RETENTION_DAYS

@sebastianrath sebastianrath merged commit f9ccdc3 into main Jan 30, 2026
9 checks passed
@sebastianrath sebastianrath deleted the bugfix/github-environment branch January 30, 2026 05:03
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.

2 participants