Skip to content

BUG: GITHUB_TOKEN doesn't work when this action is in a shared WF #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
actuarysailor opened this issue May 24, 2023 · 0 comments
Open

Comments

@actuarysailor
Copy link

If this action is in a workflow triggered by workflow_call:, it does not have access to secrets.GITHUB_TOKEN like it should... I believe this is because you are using it as an env variable rather than just a parameter to pass into your action.

A clear and concise description of what the bug is.

Make a repo with this action in a workflow_call:

Reference that action with uses in an action from a different repo (same org/account)

Witness error.

It should run as defined by GitHub

jaegermoritz added a commit to jaegermoritz/vocabulary-trainer that referenced this issue Apr 2, 2025
- the action-semantic-pull-request action is not able to run as workflow_call
- see amannn/action-semantic-pull-request#232
- see amannn/action-semantic-pull-request#271
jaegermoritz added a commit to jaegermoritz/vocabulary-trainer that referenced this issue Apr 2, 2025
* ci(release): 👷 add github actions workflows

* ci: 👷 restructure CI workflows

- the action-semantic-pull-request action is not able to run as workflow_call
- see amannn/action-semantic-pull-request#232
- see amannn/action-semantic-pull-request#271

* ci: 👷 run push workflow only on push action

- rewrite the workflow as amannn/action-semantic-pull-request@v5 cannot run on push
- do not run push workflow on pull_request action
- do not run push workflow on pull_request_target action

* ci: 👷 remove secret GITHUB_TOKEN

- prevent variable name collision with system reserved name

* ci: 🚧 remove secret GITHUB_TOKEN

* ci: 🚧 try to get the changesets setup

* ci: 🚧 fix unknown commits issue

* ci: 🚧 fix unknown package

* ci: 🚧 fix local action run

* ci: 🚧 simplify workflows
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

No branches or pull requests

1 participant