Files

94 lines
2.0 KiB
YAML
Raw Permalink Normal View History

include-source: false # Drop file/line/col from output
---
on: push
jobs:
2023-02-17 18:36:00 -05:00
build1:
runs-on: ubuntu-latest
steps:
- run: echo ${{ github.sha }} # github context
- run: echo ${{ vars.foo }} # vars context
- run: echo ${{ steps.foo }} # steps context
2023-02-17 18:36:00 -05:00
build2:
runs-on: ubuntu-latest
steps:
- run: ${{ '${{ this is an escaped expression }}' }} # escaped expression
- run: ${{ 'it''s an escaped quote' }} # escaped quote
---
{
"jobs": [
{
"type": "job",
2023-02-17 18:36:00 -05:00
"id": "build1",
"name": "build1",
"if": {
"type": 3,
"expr": "success()"
},
"runs-on": "ubuntu-latest",
"steps": [
{
"id": "__run",
"if": {
"type": 3,
"expr": "success()"
},
"run": {
"type": 3,
"expr": "format('echo {0}', github.sha)"
}
},
{
"id": "__run_2",
"if": {
"type": 3,
"expr": "success()"
},
"run": {
"type": 3,
"expr": "format('echo {0}', vars.foo)"
}
},
{
"id": "__run_3",
"if": {
"type": 3,
"expr": "success()"
},
"run": {
"type": 3,
"expr": "format('echo {0}', steps.foo)"
}
}
]
2023-02-17 18:36:00 -05:00
},
{
"type": "job",
"id": "build2",
"name": "build2",
"if": {
"type": 3,
"expr": "success()"
},
"runs-on": "ubuntu-latest",
"steps": [
{
"id": "__run",
"if": {
"type": 3,
"expr": "success()"
},
"run": "${{ this is an escaped expression }}"
},
{
"id": "__run_2",
"if": {
"type": 3,
"expr": "success()"
},
"run": "it's an escaped quote"
}
]
}
]
}