Skip to content

No suport of env vars in main action #42

@tobalsan

Description

@tobalsan

Codex doesn't have access to env vars defined either in the step or job level, e.g.:

- name: Run Codex to assess the plan  
  id: codex_assess  
  uses: openai/codex-action@main  
  env:  
    GH_TOKEN: ${{ steps.generate_token.outputs.token }} 

If my prompt instructs to use gh, Codex will fail because:

bash -lc 'gh issue view 47 --json number,title,body,state,assignees,author,labels,comments' in /home/runner/work/my/repo exited 4 in 2.24s:
gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable. Example:
  env:
    GH_TOKEN: ${{ github.token }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions