-
I’m trying to use the GITHUB_TOKEN to authenticate on behalf of GitHub Actions. I’m trying to access the “GITHUB_TOKEN” environment variable through a Python file, which is run when the action is triggered. But for some reason, it seems like the environment variable doesn’t exist. My Python file is using the PyGithub package to authenticate:
and it throws this error:
Am I misinterpreting the docs? Here’s the full error log |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You need to set the env variable explicitly: env: |
Beta Was this translation helpful? Give feedback.
You need to set the env variable explicitly:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}