Skip to content

Commit

Permalink
Provide example of boolean input usage
Browse files Browse the repository at this point in the history
Many people are confused by the usage of boolean.  actions/runner#1483

invalid
if: ${{ inputs.perform_deploy }}
if: inputs.perform_deploy

Must be treated as string
  • Loading branch information
tevans-submittable authored Feb 11, 2022
1 parent 141e1c3 commit d845f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/actions/learn-github-actions/contexts.md
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,14 @@ on:
deploy_target:
required: true
type: string
perform_deploy:
required: true
type: boolean
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ inputs.perform_deploy == 'true' }}
steps:
- name: Deploy build to target
run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }}
Expand Down

0 comments on commit d845f9a

Please sign in to comment.