48
48
# actual boolean value, it's safest to use `contains` because it casts the
49
49
# input to string, meaning we get the same behavior for true and 'true'.
50
50
# 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
+ CODER_RELEASE : ${{ contains(inputs.snapshot, 'false') }}
55
+ CODER_RELEASE_INCREMENT : ${{ inputs.increment }}
56
+ CODER_RELEASE_DRAFT : ${{ inputs.draft }}
57
+ CODER_DRY_RUN : ${{ contains(inputs.dry_run, 'true') || contains(inputs.snapshot, 'true') }}
55
58
56
59
jobs :
57
60
release :
85
88
ref=HEAD
86
89
old_version="$(git describe --abbrev=0 "$ref^1")"
87
90
88
- if [[ "${{ github.event. inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
91
+ if [[ "${{ inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
89
92
export CODER_IGNORE_MISSING_COMMIT_METADATA=1
90
93
fi
91
94
@@ -273,7 +276,7 @@ jobs:
273
276
274
277
- name : Publish Helm Chart
275
278
# 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') }}
279
+ if : ${{ contains(inputs.dry_run, 'false') && contains(inputs.snapshot, 'false') }}
277
280
run : |
278
281
set -euo pipefail
279
282
version="$(./scripts/version.sh)"
@@ -285,7 +288,7 @@ jobs:
285
288
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
286
289
287
290
- 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') }}
291
+ if : ${{ contains(inputs.dry_run, 'true') || contains(inputs.snapshot, 'true') }}
289
292
uses : actions/upload-artifact@v2
290
293
with :
291
294
name : release-artifacts
0 commit comments