diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-16 16:37:33 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-16 16:37:33 -0400 |
commit | fe14534c57b97c2ab3bfd9eade681f6a404f72a2 (patch) | |
tree | 1a4985c73593e51afa3db88e6c7a530f5dc85515 | |
parent | 189711f41cb262a958ccdabfe9687caa4eb17e79 (diff) |
Fix test for github.event.inputs.release_run.
-rw-r--r-- | .github/workflows/build.yaml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 27516aacf0..4f35b2c813 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,20 +26,20 @@ jobs: env: # Build with a tag like "Second_Life#abcdef0" to generate a release page # (used for builds we are planning to deploy). + # Even though inputs.release_run is specified with type boolean, which + # correctly presents a checkbox, its *value* is a GH workflow string + # 'true' or 'false'. If you simply test github.event.inputs.release_run, + # it always evaluates as true because it's a non-empty string either way. # When you want to use a string variable as a workflow YAML boolean, it's # important to ensure it's the empty string when false. If you omit || '', - # its value when false is "false", which is interpreted as true. + # its value when false is "false", which (again) is interpreted as true. RELEASE_RUN: ${{ (github.event.inputs.release_run != 'false' || (github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life'))) && 'Y' || '' }} steps: - name: Set Variable id: setvar shell: bash run: | - echo "release_run = ${{ github.event.inputs.release_run }}" - echo "ref_type = ${{ github.ref_type }}" - echo "RELEASE_RUN = $RELEASE_RUN" echo "release_run=$RELEASE_RUN" >> "$GITHUB_OUTPUT" - exit 1 - name: Determine source branch id: which-branch |