@@ -27,11 +27,31 @@ jobs:
27
27
runs-on : ubuntu-latest
28
28
timeout-minutes : 10
29
29
outputs :
30
+ # Some of the referenced steps set outputs conditionally and there may be
31
+ # cases when referencing them evaluates to empty strings. It is nice to
32
+ # work with proper booleans so they have to be evaluated through JSON
33
+ # conversion in the expressions. However, empty strings used like that
34
+ # may trigger all sorts of undefined and hard-to-debug behaviors in
35
+ # GitHub Actions CI/CD. To help with this, all of the outputs set here
36
+ # that are meant to be used as boolean flags (and not arbitrary strings),
37
+ # MUST have fallbacks with default values set. A common pattern would be
38
+ # to add ` || false` to all such expressions here, in the output
39
+ # definitions. They can then later be safely used through the following
40
+ # idiom in job conditionals and other expressions. Here's some examples:
41
+ #
42
+ # if: fromJSON(needs.check_source.outputs.run-docs)
43
+ #
44
+ # ${{
45
+ # fromJSON(needs.check_source.outputs.run_tests)
46
+ # && 'truthy-branch'
47
+ # || 'falsy-branch'
48
+ # }}
49
+ #
30
50
run-docs : ${{ steps.docs-changes.outputs.run-docs || false }}
31
- run_tests : ${{ steps.check.outputs.run_tests }}
32
- run_hypothesis : ${{ steps.check.outputs.run_hypothesis }}
33
- run_cifuzz : ${{ steps.check.outputs.run_cifuzz }}
34
- config_hash : ${{ steps.config_hash.outputs.hash }}
51
+ run_tests : ${{ steps.check.outputs.run_tests || false }}
52
+ run_hypothesis : ${{ steps.check.outputs.run_hypothesis || false }}
53
+ run_cifuzz : ${{ steps.check.outputs.run_cifuzz || false }}
54
+ config_hash : ${{ steps.config_hash.outputs.hash }} # str
35
55
steps :
36
56
- uses : actions/checkout@v4
37
57
- name : Check for source changes
0 commit comments