-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't workingkeepLabel can be added as soon as we are sure the work on the issue is necessaryLabel can be added as soon as we are sure the work on the issue is necessarytriagedNeeds extra internal investigation before adding ready-for-devNeeds extra internal investigation before adding ready-for-dev
Description
Describe the bug
I'm not sure if closed issues are monitored, as there was no reaction from official side at all. This is a new issue related to #1483.
For composite actions boolean inputs are not actually booleans.
To Reproduce
inputs:
...
generate-release-notes:
description: ...
required: false
type: boolean
default: false
runs:
using: composite
steps:
- name: Create Release
uses: actions/github-script@v6
with:
script: |
github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
...
generate_release_notes: ${{ inputs.generate-release-notes && 'true' || 'false' }}
});
Caller:
- uses: flobernd/actions/github/create-release@master
with:
tag-name: v1.2.4
generate-release-notes: true
This line always evaluates to false
:
generate_release_notes: ${{ inputs.generate-release-notes && 'true' || 'false' }}
The explicit syntax does incorrectly evaluate to false
as well:
generate_release_notes: ${{ inputs.generate-release-notes == true && 'true' || 'false' }}
Correct behavior is only observed when using string semantics:
generate_release_notes: ${{ inputs.generate-release-notes == 'true' && 'true' || 'false' }}
Expected behavior
generate_release_notes: ${{ inputs.generate-release-notes && 'true' || 'false' }}
generate_release_notes: ${{ inputs.generate-release-notes == true && 'true' || 'false' }}
Evaluates to true
.
Runner Version and Platform
GitHub managed runners (latest version). All platforms.
StephenHodgson, ShimonOhayon, HadwaAbdelhalem, kawaharasatoru-mf, ssallmen-pro and 99 morestdavis, devth and bouchezi
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingkeepLabel can be added as soon as we are sure the work on the issue is necessaryLabel can be added as soon as we are sure the work on the issue is necessarytriagedNeeds extra internal investigation before adding ready-for-devNeeds extra internal investigation before adding ready-for-dev