github.com/nektos/act@v0.2.63/pkg/runner/testdata/workflow_dispatch/workflow_dispatch.yml (about)

     1  name: workflow_dispatch
     2  
     3  on:
     4    workflow_dispatch:
     5      inputs:
     6        required:
     7          description: a required input
     8          required: true
     9        with_default:
    10          description: an input with default
    11          required: false
    12          default: default
    13        boolean:
    14          description: an input of type boolean
    15          required: false
    16          type: boolean
    17  
    18  jobs:
    19    test:
    20      runs-on: ubuntu-latest
    21      steps:
    22        - name: test required input
    23          run: |
    24            echo input.required=${{ inputs.required }}
    25            [[ "${{ inputs.required }}" = "required input" ]] || exit 1
    26        - name: test input with default
    27          run: |
    28            echo input.with_default=${{ inputs.with_default }}
    29            [[ "${{ inputs.with_default }}" = "default" ]] || exit 1
    30        - id: boolean-test
    31          name: run on boolean input
    32          if: ${{ inputs.boolean == true }}
    33          run: echo "::set-output name=value::executed"
    34        - name: has boolean test?
    35          run: |
    36            [[ "${{ steps.boolean-test.outputs.value }}" = "executed" ]] || exit 1