include-source: false # Drop file/line/col from output
skip:
  - Go
---
on: push
jobs:
  build:
    strategy:
      matrix:
        version:
          - v1
          - v2
    uses: contoso/templates/.github/workflows/build.yml@v1
    with:
      version: ${{ matrix.version }}
---
contoso/templates/.github/workflows/build.yml@v1
---
on:
  workflow_call:
    inputs:
      version:
        type: string
jobs:
  build-it:
    runs-on: ubuntu-latest
    steps:
      - run: echo version=${{ inputs.version }}
---
{
  "jobs": [
    {
      "type": "reusableWorkflowJob",
      "id": "build",
      "name": "build",
      "needs": [],
      "if": {
        "type": 3,
        "expr": "success()"
      },
      "ref": "contoso/templates/.github/workflows/build.yml@v1",
      "input-definitions": {
        "type": 2,
        "map": [
          {
            "Key": "version",
            "Value": {
              "type": 2,
              "map": [
                {
                  "Key": "type",
                  "Value": "string"
                }
              ]
            }
          }
        ]
      },
      "input-values": {
        "type": 2,
        "map": [
          {
            "Key": "version",
            "Value": {
              "type": 3,
              "expr": "matrix.version"
            }
          }
        ]
      },
      "strategy": {
        "type": 2,
        "map": [
          {
            "Key": "matrix",
            "Value": {
              "type": 2,
              "map": [
                {
                  "Key": "version",
                  "Value": {
                    "type": 1,
                    "seq": [
                      "v1",
                      "v2"
                    ]
                  }
                }
              ]
            }
          }
        ]
      },
      "jobs": [
        {
          "type": "job",
          "id": "build-it",
          "name": "build-it",
          "if": {
            "type": 3,
            "expr": "success()"
          },
          "runs-on": "ubuntu-latest",
          "steps": [
            {
              "id": "__run",
              "if": {
                "type": 3,
                "expr": "success()"
              },
              "run": {
                "type": 3,
                "expr": "format('echo version={0}', inputs.version)"
              }
            }
          ]
        }
      ]
    }
  ]
}
