@@ -42,15 +42,8 @@ permissions:
42
42
concurrency : ${{ github.workflow }}-${{ github.ref }}
43
43
44
44
env :
45
- # Use string semantics for negating the boolean, otherwise it will always
46
- # be false. See https://github.com/actions/runner/issues/1483.
47
- # Note that any time we need to do expressions, more than outputting the
48
- # actual boolean value, it's safest to use `contains` because it casts the
49
- # input to string, meaning we get the same behavior for true and 'true'.
50
- # Boolean behavior differs between workflow_dispatch and workflow_call.
51
- #
52
- # Also note that inputs (vs github.event.inputs) are usable across both
53
- # workflow_dispatch and workflow_call.
45
+ # Use `inputs` (vs `github.event.inputs`) to ensure that booleans are actual
46
+ # booleans, not strings.
54
47
# https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/
55
48
CODER_RELEASE : ${{ !inputs.snapshot }}
56
49
CODER_RELEASE_INCREMENT : ${{ inputs.increment }}
77
70
- name : Fetch git tags
78
71
run : git fetch --tags --force
79
72
80
- - name : Test
81
- run : |
82
- echo ${{ inputs.dry_run && '--dry-run' || 'no dry' }}
83
- echo ${{ inputs.dry_run && '--dry-run' || '' }}
84
- echo ${{ inputs.dry_run && '--dry-run' }}
85
- echo ${{ !inputs.dry_run && 'no dry' || '--dry-run'}}
86
- echo ${{ (!inputs.dry_run && !inputs.snapshot) && 'release' || 'no release'}}
87
- echo ${{ (inputs.dry_run || inputs.snapshot) && 'no release' || 'release'}}
88
- exit 1
89
-
90
73
# Configure git user name/email for creating annotated version tag.
91
74
- name : Setup git config
92
75
run : |
@@ -286,8 +269,7 @@ jobs:
286
269
uses : " google-github-actions/setup-gcloud@v1"
287
270
288
271
- name : Publish Helm Chart
289
- # Do not publish helm charts for either dry run or snapshots.
290
- if : ${{ contains(inputs.dry_run, 'false') && contains(inputs.snapshot, 'false') }}
272
+ if : ${{ !inputs.dry_run && !inputs.snapshot }}
291
273
run : |
292
274
set -euo pipefail
293
275
version="$(./scripts/version.sh)"
@@ -299,7 +281,7 @@ jobs:
299
281
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
300
282
301
283
- name : Upload artifacts to actions (if dry-run or snapshot)
302
- if : ${{ contains( inputs.dry_run, 'true') || contains( inputs.snapshot, 'true') }}
284
+ if : ${{ inputs.dry_run || inputs.snapshot }}
303
285
uses : actions/upload-artifact@v2
304
286
with :
305
287
name : release-artifacts
0 commit comments