Invalid secret, github-token is not defined in the referenced workflow #26749
-
I have the following GitHub Action setup for reuse:
mdn/workflows/blob/d971cc3696bf46ae32617e058393e45cec55ff85/.github/workflows/auto-merge.yml
on: [workflow_call] jobs: I am reusing it here: mdn-minimalist/auto-merge.yml at 4c2fd5a9fe02c844788001064d72d98dc2ef801b · mdn/mdn-minimalist · GitHub When the action on
I am kinda stumped as it definitely looks to be defined in the referenced workflow. Any ideas? Is there a naming convention that I am missing? Thing is, the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The reusable workflow needs to declare which secrets can be passed to it, see the documentation on
And also make sure to use the same name when passing the secret from the calling workflow. |
Beta Was this translation helpful? Give feedback.
-
Oh brilliant! Thanks so much. |
Beta Was this translation helpful? Give feedback.
-
The working solution as of 2024: https://stackoverflow.com/a/69495861/1935611 |
Beta Was this translation helpful? Give feedback.
The reusable workflow needs to declare which secrets can be passed to it, see the documentation on
on.workflow_call.secrets
. That’s missing in your reusable workflow, you probably need something like this:And also make sure to use the same name when passing the secret from the calling workflow.