Skip to content

Commit

Permalink
Add better input handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Jun 25, 2024
1 parent db77d0e commit f0139f1
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,30 @@ concurrency:
jobs:
context:
runs-on: ubuntu-latest

outputs:
boolean: ${{ steps.inputs.outputs.boolean }}
number: ${{ steps.inputs.outputs.number }}
string: ${{ steps.inputs.outputs.string }}
optional: ${{ steps.inputs.outputs.optional }}

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/context

- id: inputs
shell: bash
run: |
boolean="${{ inputs.boolean || false }}"
number="${{ inputs.number || 10 }}"
string="${{ inputs.string || 'goodbye' }}"
optional="${{ inputs.optional }}"
call_worker:
needs: context
uses: ./.github/workflows/worker.yml
with:
boolean: ${{ inputs.boolean == 'true' }}
number: ${{ inputs.number }}
string: ${{ inputs.string }}
optional: ${{ inputs.optional }}
boolean: ${{ needs.context.outputs.boolean }}
number: ${{ needs.context.outputs.number }}
string: ${{ needs.context.outputs.string }}
optional: ${{ needs.context.outputs.optional }}

0 comments on commit f0139f1

Please sign in to comment.