fix: update reusable workflow input handling (#2349)

* update reusable workflow input handling

* make test stricter

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX
2024-06-05 16:30:12 +02:00
committed by GitHub
parent 55a8f9afc5
commit b917ecc184
3 changed files with 23 additions and 20 deletions

View File

@@ -45,23 +45,23 @@ jobs:
- name: test required bool
run: |
echo inputs.bool_required=${{ inputs.bool_required }}
[[ "${{ inputs.bool_required }}" = "true" ]] || exit 1
echo inputs.bool_required=${{ tojson(inputs.bool_required) }}
[[ "${{ tojson(inputs.bool_required) }}" = "true" ]] || exit 1
- name: test optional bool
run: |
echo inputs.bool_optional=${{ inputs.bool_optional }}
[[ "${{ inputs.bool_optional }}" = "true" ]] || exit 1
echo inputs.bool_optional=${{ tojson(inputs.bool_optional) }}
[[ "${{ tojson(inputs.bool_optional) }}" = "true" ]] || exit 1
- name: test required number
run: |
echo inputs.number_required=${{ inputs.number_required }}
[[ "${{ inputs.number_required == 1 }}" = "true" ]] || exit 1
echo inputs.number_required=${{ tojson(inputs.number_required) }}
[[ "${{ tojson(inputs.number_required) == '1' }}" = "true" ]] || exit 1
- name: test optional number
run: |
echo inputs.number_optional=${{ inputs.number_optional }}
[[ "${{ inputs.number_optional == 1 }}" = "true" ]] || exit 1
echo inputs.number_optional=${{ tojson(inputs.number_optional) }}
[[ "${{ tojson(inputs.number_optional) == '1' }}" = "true" ]] || exit 1
- name: test secret
run: |