Skip to content

Commit 2e15311

Browse files
authored
Dump context (#43)
1 parent 1057d0c commit 2e15311

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/actions/context/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: 'Dump Context'
2+
description: 'Display context for action run'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Dump GitHub context
8+
shell: bash
9+
env:
10+
GITHUB_CONTEXT: ${{ toJson(github) }}
11+
run: echo "$GITHUB_CONTEXT"
12+
- name: Dump job context
13+
shell: bash
14+
env:
15+
JOB_CONTEXT: ${{ toJson(job) }}
16+
run: echo "$JOB_CONTEXT"
17+
- name: Dump steps context
18+
shell: bash
19+
env:
20+
STEPS_CONTEXT: ${{ toJson(steps) }}
21+
run: echo "$STEPS_CONTEXT"
22+
- name: Dump runner context
23+
shell: bash
24+
env:
25+
RUNNER_CONTEXT: ${{ toJson(runner) }}
26+
run: echo "$RUNNER_CONTEXT"

.github/workflows/deployment.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: On Deployment
2+
3+
on:
4+
deployment
5+
6+
jobs:
7+
link:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: ./.github/actions/context

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
pull_request:
44
merge_group:
55
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: ./.github/actions/context
611
test:
712
if: github.event_name == 'pull_request'
813
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)