aa1e7d8aec
Add a boolean 'deployment' property to the job environment mapping. When set to false, the parsed environment reference sets skipDeployment to signal that no deployment record should be created.
92 lines
1.6 KiB
YAML
92 lines
1.6 KiB
YAML
include-source: false # Drop file/line/col from output
|
|
skip:
|
|
- C#
|
|
---
|
|
on: push
|
|
jobs:
|
|
build:
|
|
environment:
|
|
name: production
|
|
deployment: false
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo hi
|
|
build2:
|
|
environment:
|
|
name: staging
|
|
deployment: true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: echo hi
|
|
---
|
|
{
|
|
"jobs": [
|
|
{
|
|
"type": "job",
|
|
"id": "build",
|
|
"name": "build",
|
|
"if": {
|
|
"type": 3,
|
|
"expr": "success()"
|
|
},
|
|
"environment": {
|
|
"type": 2,
|
|
"map": [
|
|
{
|
|
"Key": "name",
|
|
"Value": "production"
|
|
},
|
|
{
|
|
"Key": "deployment",
|
|
"Value": false
|
|
}
|
|
]
|
|
},
|
|
"runs-on": "ubuntu-latest",
|
|
"steps": [
|
|
{
|
|
"id": "__run",
|
|
"if": {
|
|
"type": 3,
|
|
"expr": "success()"
|
|
},
|
|
"run": "echo hi"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "job",
|
|
"id": "build2",
|
|
"name": "build2",
|
|
"if": {
|
|
"type": 3,
|
|
"expr": "success()"
|
|
},
|
|
"environment": {
|
|
"type": 2,
|
|
"map": [
|
|
{
|
|
"Key": "name",
|
|
"Value": "staging"
|
|
},
|
|
{
|
|
"Key": "deployment",
|
|
"Value": true
|
|
}
|
|
]
|
|
},
|
|
"runs-on": "ubuntu-latest",
|
|
"steps": [
|
|
{
|
|
"id": "__run",
|
|
"if": {
|
|
"type": 3,
|
|
"expr": "success()"
|
|
},
|
|
"run": "echo hi"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|