GitHub Actions Reusable Workflow "invalid value workflow reference"
A job that calls a reusable workflow has a malformed uses: reference, is missing a required input, or does not pass the secrets the called workflow needs.
What this error means
The caller workflow fails to compile or the called workflow errors at runtime, complaining about the workflow reference format, a missing required input, or an undefined secret.
Invalid workflow file: .github/workflows/release.yml
invalid value workflow reference: no version specified
# reusable workflow uses must be owner/repo/.github/workflows/x.yml@refCommon causes
Wrong uses: reference format
A reusable workflow call needs the full path owner/repo/.github/workflows/file.yml@ref. Omitting the @ref or the .github/workflows path is invalid.
Missing required input
If the called workflow declares an input as required: true, the caller must supply it under with, or the run fails.
Secrets not forwarded
Reusable workflows do not automatically see the caller secrets. They must be passed explicitly or via secrets: inherit.
How to fix it
Use the full reference and pass inputs
jobs:
call:
uses: my-org/ci/.github/workflows/build.yml@v1
with:
environment: staging
secrets: inheritDeclare inputs and secrets in the called workflow
The reusable workflow must define on: workflow_call with its inputs and secrets so callers know the contract.
on:
workflow_call:
inputs:
environment:
required: true
type: string
secrets:
DEPLOY_TOKEN:
required: trueHow to prevent it
- Pin reusable workflows to a tag or SHA and use the full owner/repo path.
- Document required inputs and secrets in the workflow_call block.
- Use secrets: inherit only when the caller is trusted to expose all its secrets.