github.com/nektos/act@v0.2.63/pkg/runner/testdata/uses-composite/composite_action/action.yml (about)

     1  ---
     2  name: "Test Composite Action"
     3  description: "Test action uses composite"
     4  
     5  inputs:
     6    test_input_required:
     7      description: "Required input"
     8      required: true
     9    test_input_optional:
    10      description: "optional defaulted input"
    11      required: false
    12      default: "test_input_optional_value"
    13    test_input_optional_with_default_overriden:
    14      description: "optional defaulted input"
    15      required: false
    16      default: "test_input_optional_value"
    17    test_input_required_with_default:
    18      description: "Required with default, due to an old bug of github actions this is allowed"
    19      required: true
    20      default: "test_input_optional_value"
    21    test_input_required_with_default_overriden:
    22      description: "Required with default, due to an old bug of github actions this is allowed"
    23      required: true
    24      default: "test_input_optional_value"
    25    secret_input:
    26      description: test pass a secret as input
    27  outputs:
    28    test_output:
    29      description: "Output value to pass up"
    30      value: ${{ steps.output.outputs.test_output }}
    31    secret_output:
    32      description: test pass a secret as output
    33      value: ${{ format('{0}/{1}', inputs.secret_input, env.secret_input) }}
    34  
    35  runs:
    36    using: "composite"
    37    steps:
    38      - name: echo inputs
    39        run: |
    40          echo "#####################################"
    41          echo "Inputs:"
    42          echo "---"
    43          echo "test_input_required=${{ inputs.test_input_required }}"
    44          echo "test_input_optional=${{ inputs.test_input_optional }}"
    45          echo "test_input_optional_with_default_overriden=${{ inputs.test_input_optional_with_default_overriden }}"
    46          echo "test_input_required_with_default=${{ inputs.test_input_required_with_default }}"
    47          echo "test_input_required_with_default_overriden=${{ inputs.test_input_required_with_default_overriden }}"
    48          echo "---"
    49        shell: bash
    50  
    51      # Let's test the inputs
    52      - run: |
    53          if [ "${{ inputs.test_input_required }}" != "test_input_required_value" ]; then
    54            exit 1
    55          fi
    56        shell: bash
    57  
    58      - run: |
    59          if [ "${{ inputs.test_input_optional }}" != "test_input_optional_value" ]; then
    60            exit 1
    61          fi
    62        shell: bash
    63  
    64      - run: |
    65          if [ "${{ inputs.test_input_optional_with_default_overriden }}" != "test_input_optional_with_default_overriden" ]; then
    66            exit 1
    67          fi
    68        shell: bash
    69  
    70      - run: |
    71          if [ "${{ inputs.test_input_required_with_default }}" != "test_input_optional_value" ]; then
    72            exit 1
    73          fi
    74        shell: bash
    75  
    76      - run: |
    77          if [ "${{ inputs.test_input_required_with_default_overriden }}" != "test_input_required_with_default_overriden" ]; then
    78            exit 1
    79          fi
    80        shell: bash
    81  
    82      - run: |
    83          if [ -z "$GITHUB_ACTION_PATH" ]; then
    84            exit 1
    85          fi
    86          if [ -z "${{ github.action_path }}" ]; then
    87            exit 2
    88          fi
    89        shell: bash
    90  
    91      # Let's send up an output to test
    92      - run: echo "::set-output name=test_output::test_output_value"
    93        id: output
    94        shell: bash
    95      - run: echo "COMPOSITE_ACTION_ENV_OUTPUT=my test value" >> $GITHUB_ENV
    96        shell: bash
    97