Skip to content

Commit f0139f1

Browse files
committed
Add better input handling
1 parent db77d0e commit f0139f1

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/default.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,30 @@ concurrency:
3535
jobs:
3636
context:
3737
runs-on: ubuntu-latest
38+
39+
outputs:
40+
boolean: ${{ steps.inputs.outputs.boolean }}
41+
number: ${{ steps.inputs.outputs.number }}
42+
string: ${{ steps.inputs.outputs.string }}
43+
optional: ${{ steps.inputs.outputs.optional }}
44+
3845
steps:
3946
- uses: actions/checkout@v4
4047
- uses: ./.github/actions/context
48+
49+
- id: inputs
50+
shell: bash
51+
run: |
52+
boolean="${{ inputs.boolean || false }}"
53+
number="${{ inputs.number || 10 }}"
54+
string="${{ inputs.string || 'goodbye' }}"
55+
optional="${{ inputs.optional }}"
56+
4157
call_worker:
58+
needs: context
4259
uses: ./.github/workflows/worker.yml
4360
with:
44-
boolean: ${{ inputs.boolean == 'true' }}
45-
number: ${{ inputs.number }}
46-
string: ${{ inputs.string }}
47-
optional: ${{ inputs.optional }}
61+
boolean: ${{ needs.context.outputs.boolean }}
62+
number: ${{ needs.context.outputs.number }}
63+
string: ${{ needs.context.outputs.string }}
64+
optional: ${{ needs.context.outputs.optional }}

0 commit comments

Comments
 (0)