potiuk commented on code in PR #38749:
URL: https://github.com/apache/airflow/pull/38749#discussion_r1551653809
##########
.github/workflows/build-images.yml:
##########
@@ -224,7 +224,7 @@ jobs:
pull-request-target: "true"
is-committer-build: ${{ needs.build-info.outputs.is-committer-build }}
push-image: "true"
- use-uv: "true"
+ use-uv: ${{ needs.build-info.outputs.default-branch == 'main' && 'true'
|| 'false' }}
Review Comment:
Yeah. UNFORTUNATELY Github Actions inputs/outputs cannot **really** be bool.
Even if you declare them as `bool` this is only used to determine the controls
displayed when you run "user triggered" workflows - not when workflows pass the
inputs between themselves. Mainly because outputs are generated by `::ouput::`
printed to the stdout :shrug:
So if you want to have a dynamic input generated from an output of another
task, you have two choices: `string` or `string` :) . You could potentially
turn it into bool by ..... wait for it ...... `${{ fromJson(input.x) }}` if you
write bool json representation, but this is far too brittle and complicated (I
had to do that for arrays of labels and that **really** requires you to change
names of your inputs to be clear that they are passing json, otherwise you
quickly loose understanding which type of the input you have at hand (that's
why in the latest iteration we have `runs-on-as-json-default` for example -
becuase it contanrs json-formatted array.
That's why I adopted the convention that we pass bool inputs as `true' /
'false` strings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]