Mixed `${{ inputs }}` reusable workflow and caller workflow
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
The inputs between workflow_call and workflow_dispatch are unified (https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/). However, I found a corner case that seems to behave incorrectly. When a workflow runs on workflow_dispatch event and calls a reusable workflow, the reusable workflow's inputs contain not only its defined inputs, but also the calling workflow's inputs (from the dispatch event)
To Reproduce
- Create workflow.yml:
on:
workflow_dispatch:
inputs:
release-tag:
description: "Release tag to test"
required: false
default: v1
type: string
jobs:
release:
permissions:
uses: <repo>/<name>/.github/workflows/reusable.yml@main
with:
name1: value1
- create reusable workflow:
on:
workflow_call:
inputs:
name1:
description: "name 1"
required: true
type: string
jobs:
test:
outputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "inputs: ${{ inputs }}"
This will show both the name1 and release-tag, even though the input to the reusable workflow has only one input defined (name1).
Expected behavior
Only the name1 input should show.
Runner Version and Platform
Version of your runner?
ubuntu-latest
What's not working?
Please include error messages and screenshots.
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the workflow_dispatch caller and workflow_call reusable workflow from the issue, then inspect the runner's handling of the inputs context and compare the job or worker diagnostics. Done means the reusable workflow's inputs contain only its declared name1 input, without the caller's release-tag input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100