4848 # actual boolean value, it's safest to use `contains` because it casts the
4949 # input to string, meaning we get the same behavior for true and 'true'.
5050 # Boolean behavior differs between workflow_dispatch and workflow_call.
51- CODER_RELEASE : ${{ contains(github.event.inputs.snapshot, 'false') }}
52- CODER_RELEASE_INCREMENT : ${{ github.event.inputs.increment }}
53- CODER_RELEASE_DRAFT : ${{ github.event.inputs.draft }}
54- CODER_DRY_RUN : ${{ contains(github.event.inputs.dry_run, 'true') || contains(github.event.inputs.snapshot, 'true') }}
51+ #
52+ # Also note that inputs (vs github.event.inputs) are usable across both
53+ # workflow_dispatch and workflow_call.
54+ # https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/
55+ CODER_RELEASE : ${{ contains(inputs.snapshot, 'false') }}
56+ CODER_RELEASE_INCREMENT : ${{ inputs.increment }}
57+ CODER_RELEASE_DRAFT : ${{ inputs.draft }}
58+ CODER_DRY_RUN : ${{ contains(inputs.dry_run, 'true') || contains(inputs.snapshot, 'true') }}
5559
5660jobs :
5761 release :
8589 ref=HEAD
8690 old_version="$(git describe --abbrev=0 "$ref^1")"
8791
88- if [[ "${{ github.event. inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
92+ if [[ "${{ inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
8993 export CODER_IGNORE_MISSING_COMMIT_METADATA=1
9094 fi
9195
@@ -273,7 +277,7 @@ jobs:
273277
274278 - name : Publish Helm Chart
275279 # Do not publish helm charts for either dry run or snapshots.
276- if : ${{ contains(github.event. inputs.dry_run, 'false') && contains(github.event. inputs.snapshot, 'false') }}
280+ if : ${{ contains(inputs.dry_run, 'false') && contains(inputs.snapshot, 'false') }}
277281 run : |
278282 set -euo pipefail
279283 version="$(./scripts/version.sh)"
@@ -285,7 +289,7 @@ jobs:
285289 gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
286290
287291 - name : Upload artifacts to actions (if dry-run or snapshot)
288- if : ${{ contains(github.event. inputs.dry_run, 'true') || contains(github.event. inputs.snapshot, 'true') }}
292+ if : ${{ contains(inputs.dry_run, 'true') || contains(inputs.snapshot, 'true') }}
289293 uses : actions/upload-artifact@v2
290294 with :
291295 name : release-artifacts
0 commit comments