Update examples
This commit is contained in:
parent
179aca65d7
commit
956a240181
62
examples.md
62
examples.md
|
@ -336,37 +336,39 @@ Alternatively, [`set-env`](https://help.github.com/en/github/automating-your-wor
|
||||||
|
|
||||||
### Debugging GitHub Actions
|
### Debugging GitHub Actions
|
||||||
|
|
||||||
**Step Debug Logging** : To enable step debug logging set the secret `ACTIONS_STEP_DEBUG` to `true` in the repository that contains the workflow.
|
#### Step Debug Logging
|
||||||
|
|
||||||
**Output Various Contexts**
|
To enable step debug logging set the secret `ACTIONS_STEP_DEBUG` to `true` in the repository that contains the workflow.
|
||||||
|
|
||||||
|
#### Output Various Contexts
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Dump event JSON
|
- name: Dump event JSON
|
||||||
env:
|
env:
|
||||||
EVENT_JSON_FILENAME: ${{ github.event_path }}
|
EVENT_JSON_FILENAME: ${{ github.event_path }}
|
||||||
run: cat "$EVENT_JSON_FILENAME"
|
run: cat "$EVENT_JSON_FILENAME"
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
run: echo "$GITHUB_CONTEXT"
|
run: echo "$GITHUB_CONTEXT"
|
||||||
- name: Dump job context
|
- name: Dump job context
|
||||||
env:
|
env:
|
||||||
JOB_CONTEXT: ${{ toJson(job) }}
|
JOB_CONTEXT: ${{ toJson(job) }}
|
||||||
run: echo "$JOB_CONTEXT"
|
run: echo "$JOB_CONTEXT"
|
||||||
- name: Dump steps context
|
- name: Dump steps context
|
||||||
env:
|
env:
|
||||||
STEPS_CONTEXT: ${{ toJson(steps) }}
|
STEPS_CONTEXT: ${{ toJson(steps) }}
|
||||||
run: echo "$STEPS_CONTEXT"
|
run: echo "$STEPS_CONTEXT"
|
||||||
- name: Dump runner context
|
- name: Dump runner context
|
||||||
env:
|
env:
|
||||||
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
||||||
run: echo "$RUNNER_CONTEXT"
|
run: echo "$RUNNER_CONTEXT"
|
||||||
- name: Dump strategy context
|
- name: Dump strategy context
|
||||||
env:
|
env:
|
||||||
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
|
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
|
||||||
run: echo "$STRATEGY_CONTEXT"
|
run: echo "$STRATEGY_CONTEXT"
|
||||||
- name: Dump matrix context
|
- name: Dump matrix context
|
||||||
env:
|
env:
|
||||||
MATRIX_CONTEXT: ${{ toJson(matrix) }}
|
MATRIX_CONTEXT: ${{ toJson(matrix) }}
|
||||||
run: echo "$MATRIX_CONTEXT"
|
run: echo "$MATRIX_CONTEXT"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue