github.com/nektos/act@v0.2.83/pkg/runner/testdata/.github/workflows/local-reusable-and-dispatch.yml (about)

     1  name: reuse
     2  
     3  on:
     4    workflow_dispatch:
     5      inputs:
     6        my-val:
     7          type: string
     8          required: true
     9          default: "default_value_reuse_workflow_dispatch_call"
    10        dispatch-val:
    11          type: string
    12          default: "I am a dispatch var for checking if I am being used in workflow_call"
    13  
    14    workflow_call:
    15      inputs:
    16        my-val:
    17          type: string
    18          required: true
    19          default: "default_value_reuse_workflow_call"
    20  
    21  jobs:
    22    reusable_workflow_job:
    23      runs-on: ubuntu-latest
    24      steps:
    25        - uses: actions/checkout@v4
    26        - name: Run a one-line script
    27          run: echo "✅ 🚀 ✅ hello this is from workflow reuse. Value - " ${{ inputs.my-val }} ${{ github.event_name }} ${{ inputs.dispatch-val }}
    28        - name: Assert
    29          run: |
    30            exit ${{ ( inputs.my-val == 'default_value_reuse_workflow_call' || inputs.my-val == 'passed value from main' ) && !inputs.dispatch-val && '0' || '1' }}