Skip to content

Commit 9e57924

Browse files
committed
Update test.yml
1 parent 016271b commit 9e57924

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
1-
name: Test Workflow
1+
name: Context testing
2+
on: push
23

3-
on:
4-
push:
54
jobs:
6-
check:
5+
dump_contexts_to_log:
76
runs-on: ubuntu-latest
8-
9-
name: Checkout
107
steps:
11-
- uses: actions/checkout@v4
12-
with:
13-
fetch-depth: 0
14-
15-
- name: Dump vars context
8+
- name: Dump GitHub context
9+
env:
10+
GITHUB_CONTEXT: ${{ toJson(github) }}
11+
run: echo "$GITHUB_CONTEXT"
12+
- name: Dump job context
13+
env:
14+
JOB_CONTEXT: ${{ toJson(job) }}
15+
run: echo "$JOB_CONTEXT"
16+
- name: Dump steps context
17+
env:
18+
STEPS_CONTEXT: ${{ toJson(steps) }}
19+
run: echo "$STEPS_CONTEXT"
20+
- name: Dump runner context
21+
env:
22+
RUNNER_CONTEXT: ${{ toJson(runner) }}
23+
run: echo "$RUNNER_CONTEXT"
24+
- name: Dump strategy context
25+
env:
26+
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
27+
run: echo "$STRATEGY_CONTEXT"
28+
- name: Dump matrix context
1629
env:
17-
VARS_JSON: ${{ toJSON(vars) }}
18-
run: echo "${VARS_JSON}"
30+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
31+
run: echo "$MATRIX_CONTEXT"

0 commit comments

Comments
 (0)