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
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:
Expected behavior
should print
message: default messageJob Log Output
But print
message:Runner Version and Platform
Version of your runner?
ubuntu-latest