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

129 lines
2.7 KiB
YAML

include-source: false # Drop file/line/col from output
---
on: push
jobs:
build:
uses: contoso/templates/.github/workflows/build.yml@v1
build1:
name: custom name
uses: contoso/templates/.github/workflows/build.yml@v1
build2:
name: ${{ github.ref }}
uses: contoso/templates/.github/workflows/build.yml@v1
---
contoso/templates/.github/workflows/build.yml@v1
---
on: workflow_call
jobs:
build-it:
runs-on: ubuntu-latest
steps:
- run: echo hi
---
{
"jobs": [
{
"type": "reusableWorkflowJob",
"id": "build",
"name": "build",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"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": "echo hi"
}
]
}
]
},
{
"type": "reusableWorkflowJob",
"id": "build1",
"name": "custom name",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"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": "echo hi"
}
]
}
]
},
{
"type": "reusableWorkflowJob",
"id": "build2",
"name": {
"type": 3,
"expr": "github.ref"
},
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"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": "echo hi"
}
]
}
]
}
]
}