Github context constructor called before dotenv loaded.

Expected Behavior

GITHUB_* environment variables from .env file provided as an option applied to github.context
At least I have understood it line that from .env.example

Current Behavior

Github context constructor called before dotenv loaded.
Which leads to .env file GITHUB environment variables not applied to the context.

Image

Possible Solution

Steps to Reproduce

  1. add following debug line to your action core.debug(`GitHub Context: ${JSON.stringify(context, null, 2)}`)
  2. Update values for GITHUB_* in .env file
  3. call the local-action with npx local-action . src/main.js .env

Context (Environment)

  • OS: MacOS 15.2
  • Node version: v20.18.2
  • npx version: 10.8.2
  • @github/local-action@2.5.1
  • javascript-action (with minimal modifications)