Skip to content

Invalid secret, github-token is not defined in the referenced workflow #26749

Discussion options

You must be logged in to vote

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:

on:
  workflow_call:
    secrets:
      GH_TOKEN:
        description: 'A token passed from the caller workflow'
        required: true

And also make sure to use the same name when passing the secret from the calling workflow.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants