Detect missing required inputs/secrets and undefined inputs/secrets at jobs.<job_id>.with and jobs.<job_id>.secrets. See the document for more details.
# .github/workflows/reusable.yml
on:
workflow_call:
inputs:
name:
type: string
required: true
secrets:
password:
required: true
...
# .github/workflows/test.yml
...
jobs:
missing-required:
uses: ./.github/workflows/reusable.yml
with:
# ERROR: Undefined input "user"
user: rhysd
# ERROR: Required input "name" is missing
secrets:
# ERROR: Undefined secret "credentials"
credentials: my-token
# ERROR: Required secret "password" is missing
Type check for reusable workflow inputs at jobs.<job_id>.with. Types are defined at on.workflow_call.inputs.<name>.type in reusable workflow. actionlint checks types of expressions in workflow calls. See the document for more details.
# .github/workflows/reusable.yml
on:
workflow_call:
inputs:
id:
type: number
message:
type: string
...
# .github/workflows/test.yml
...
jobs:
type-checks:
uses: ./.github/workflows/reusable.yml
with:
# ERROR: Cannot assign string value to number input. format() returns string value
id: ${{ format('runner name is {0}', runner.name) }}
# ERROR: Cannot assign null to string input. If you want to pass string "null", use ${{ 'null' }}
message: null
Detect local reusable workflow which does not exist at jobs.<job_id>.uses. See the document for more details.
jobs:
test:
# ERROR: This workflow file does not exist
with: ./.github/workflows/does-not-exist.yml
Check needs.<job_id>.outputs.<output_id> in downstream jobs of workflow call jobs. The outputs object is now typed strictly based on on.workflow_call.outputs.<name> in the called reusable workflow. See the document for more details.
# .github/workflows/get-build-info.yml
on:
workflow_call:
outputs:
version:
value: ...
description: version of software
...
# .github/workflows/test.yml
...
jobs:
# This job's outputs object is typed as {version: string}
get_build_info:
uses: ./.github/workflows/get-build-info.yml
downstream:
needs: [get_build_info]
runs-on: ubuntu-latest
steps:
# OK. `version` is defined in the reusable workflow
- run: echo '${{ needs.get_build_info.outputs.version }}'
# ERROR: `tag` is not defined in the reusable workflow
- run: echo '${{ needs.get_build_info.outputs.tag }}'