Files
languageservices/workflow-parser/testdata/reader/reusable-workflow-job-strategy.yml
Christopher Schleiden 2a3d63551f Rename folders
2023-02-22 15:52:40 -08:00

122 lines
2.4 KiB
YAML

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)"
}
}
]
}
]
}
]
}