mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2081] Setting -s GITHUB_TOKEN=... causes a GITHUB_TOKEN env variable to be set in jobs #995
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#995
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jenseng on GitHub (Nov 8, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2081
Bug report info
Command used with act
Describe issue
If you set a
GITHUB_TOKENsecret, aGITHUB_TOKENenv variable will automatically be set in jobs, even if you don't explicitly specify it in theenv. This is inconsistent with actual GitHub Actions workflows; if you want aGITHUB_TOKENenv variable, you need to explicitly set it viaenv.This is problematic since it can result in poorly written jobs "working" locally with act but then breaking when pushed to GitHub. I've run into this multiple times when I've written a job that uses the
ghCLI but forgotten to actually set theGITHUB_TOKENinenv; my local test works, but then the real run fails 🫠Link to GitHub repository
https://github.com/jenseng/dynamic-uses/actions/runs/6801630930/job/18492924811
Workflow content
Relevant log output
Additional information
No response