Files

148 lines
2.9 KiB
YAML
Raw Permalink Normal View History

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": [
{
2023-02-01 15:48:19 -08:00
"type": "reusableWorkflowJob",
"id": "build",
"name": "build",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
2023-02-01 15:48:19 -08:00
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"secret-definitions": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 2,
"map": [
{
"Key": "required",
"Value": true
}
]
}
}
]
},
2023-02-01 15:48:19 -08:00
"secret-values": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 3,
"expr": "secrets.foo"
}
}
]
},
2023-02-01 15:48:19 -08:00
"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"
}
]
}
]
},
{
2023-02-01 15:48:19 -08:00
"type": "reusableWorkflowJob",
"id": "build2",
"name": "build2",
"needs": [],
"if": {
"type": 3,
"expr": "success()"
},
2023-02-01 15:48:19 -08:00
"ref": "contoso/templates/.github/workflows/build.yml@v1",
"secret-definitions": {
"type": 2,
"map": [
{
"Key": "secret1",
"Value": {
"type": 2,
"map": [
{
"Key": "required",
"Value": true
}
]
}
}
]
},
2023-02-01 15:48:19 -08:00
"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"
}
]
}
]
}
]
}