Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cfd9f7

Browse files
committed
s/github.event.inputs/inputs/g
1 parent 182fc6d commit 9cfd9f7

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/release.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ env:
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+
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') }}
5558

5659
jobs:
5760
release:
@@ -85,7 +88,7 @@ jobs:
8588
ref=HEAD
8689
old_version="$(git describe --abbrev=0 "$ref^1")"
8790
88-
if [[ "${{ github.event.inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
91+
if [[ "${{ inputs.ignore_missing_commit_metadata }}" == *t* ]]; then
8992
export CODER_IGNORE_MISSING_COMMIT_METADATA=1
9093
fi
9194
@@ -273,7 +276,7 @@ jobs:
273276

274277
- name: Publish Helm Chart
275278
# 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') }}
277280
run: |
278281
set -euo pipefail
279282
version="$(./scripts/version.sh)"
@@ -285,7 +288,7 @@ jobs:
285288
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
286289
287290
- 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') }}
289292
uses: actions/upload-artifact@v2
290293
with:
291294
name: release-artifacts

0 commit comments

Comments
 (0)