jreleaser / release-action

:octocat: GitHub Action for JReleaser
https://jreleaser.org
Apache License 2.0
34 stars 3 forks source link

Cannot set the setup-java input to false #10

Closed dmurat closed 1 year ago

dmurat commented 1 year ago

I had problems with the setup-java input before, but I thought they were resolved. I can't confirm it since I deleted my old GitHub Actions logs.

Nevertheless, with the latest version, I can't prevent the download of JReleaser's preferred Zulu 17 JDK. I tried various combinations with the setup-java input including empty strings ('', ""), 'false', and "false", but none of those worked.

After some googling, it appears that others have similar problems too: https://github.com/actions/runner/issues/1173 https://github.com/actions/runner/issues/1483

In general, it looks like the comparison of input with boolean literal should be enclosed in parenthesis. For example, instead of

if: ${{ inputs.setup-java }} == 'true'

it should be

if: ${{ inputs.setup-java == 'true' }}

Alternatively, the parenthesis can be omitted completely, in which case GitHub Actions will add them automatically, as in

if: inputs.setup-java == 'true' (https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution)

Tnx

aalmiray commented 1 year ago

Fixed in 2.3.1, rolled into `v2.

dmurat commented 1 year ago

Just want to inform you that everything works now 😄 Thank you.