Reusable workflow input with default string is not used when the calling input passed an empty string.
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
Reusable workflow input (string) with default is not used when the calling input passed an empty string.
To Reproduce
Steps to reproduce the behavior:
- reusable workflow
name: 'reusable_workflow'
on:
workflow_call:
inputs:
message:
description: 'message.'
type: 'string'
default: 'default message'
required: false
jobs:
print-inputs:
runs-on: ubuntu-latest
steps:
- name: job summary
run: |
echo "message: ${{ inputs.message }}" >> $GITHUB_STEP_SUMMARY
- create a caller workflow that calls 1
name: 'caller'
on:
workflow_dispatch:
inputs:
message:
description: 'message'
type: 'string'
required: false
jobs:
call-reusable-workflow:
uses: '.../reusable-workflow.yml@main'
with:
message: ${{ inputs.message }}
- trigger the caller workflow without providing a message input
Expected behavior
should print message: default message
Job Log Output
But print message:
Runner Version and Platform
Version of your runner?
ubuntu-latest
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 behavior with the reusable workflow and caller workflow shown in the issue, using an omitted or empty message input. Trace how the runner handles workflow_call string defaults, then verify that the job summary prints "message: default message" when the caller provides no message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, 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