diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 17:15:25 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 17:15:25 -0400 |
commit | 1f0b80f709dd3b263e88ca6e3db027a1406ec240 (patch) | |
tree | dd4b3e64760acf3454dd7b39a18da4af0d9c56d3 /.github | |
parent | 2e144ecbb2cc7676cfb9f5ab46a2f63c8af85d85 (diff) |
Streamline the new workflow `RELEASE_RUN` logic a little.
Since downstream jobs reference the output of the new `setvar` job, instead of
directly referencing global `env.RELEASE_RUN`, no need to set `RELEASE_RUN` in
the global environment.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yaml | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 47f612f028..94bd13f4af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,19 +7,22 @@ on: branches: ["main", "release/*", "project/*"] tags: ["Second_Life*"] -env: - # Build with a tag like "Second_Life#abcdef0" to generate a release page - # (used for builds we are planning to deploy). - RELEASE_RUN: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') && 'Y' || '' }} - jobs: - # The whole point of the setvar job is that we want to reference global - # env.RELEASE_RUN in build.env, but a job.env can't directly reference the - # global env context. + # The whole point of the setvar job is that we want to set a variable once + # that will be consumed by multiple subsequent jobs. We tried setting it in + # the global env, but a job.env can't directly reference the global env + # context. setvar: runs-on: ubuntu-latest outputs: release_run: ${{ steps.setvar.outputs.release_run }} + env: + # Build with a tag like "Second_Life#abcdef0" to generate a release page + # (used for builds we are planning to deploy). + # 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. + RELEASE_RUN: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') && 'Y' || '' }} steps: - name: Set Variable id: setvar |