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

148 lines
2.9 KiB
YAML

include-source: false # Drop file/line/col from output
skip:
- Go
---
on: push
jobs:
# Mapping
build:
uses: contoso/templates/.github/workflows/build.yml@v1
secrets:
secret1: ${{ secrets.foo }}
# Inherit
build2:
uses: contoso/templates/.github/workflows/build.yml@v1
secrets: inherit
---
contoso/templates/.github/workflows/build.yml@v1
---
on:
workflow_call:
secrets:
secret1:
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo 1
---
{
"jobs": [
{
"type": "reusableWorkflowJob",
"id": "build",
"name": "build",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"secret-definitions": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 2,
"map": [
{
"Key": "required",
"Value": true
}
]
}
}
]
},
"secret-values": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 3,
"expr": "secrets.foo"
}
}
]
},
"jobs": [
{
"type": "job",
"id": "deploy",
"name": "deploy",
"if": {
"type": 3,
"expr": "success()"
},
"runs-on": "ubuntu-latest",
"steps": [
{
"id": "__run",
"if": {
"type": 3,
"expr": "success()"
},
"run": "echo 1"
}
]
}
]
},
{
"type": "reusableWorkflowJob",
"id": "build2",
"name": "build2",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"secret-definitions": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 2,
"map": [
{
"Key": "required",
"Value": true
}
]
}
}
]
},
"inherit-secrets": true,
"jobs": [
{
"type": "job",
"id": "deploy",
"name": "deploy",
"if": {
"type": 3,
"expr": "success()"
},
"runs-on": "ubuntu-latest",
"steps": [
{
"id": "__run",
"if": {
"type": 3,
"expr": "success()"
},
"run": "echo 1"
}
]
}
]
}
]
}