Skip to content

Commit

Permalink
Job context
Browse files Browse the repository at this point in the history
  • Loading branch information
e-oloughlin committed Jan 31, 2021
1 parent 23a45d6 commit 61557f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/context.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Context

on: push
on: [push, pull_request]

jobs:
functions:
Expand All @@ -14,12 +14,14 @@ jobs:
echo ${{ format('Hello {0} {1} {2}', 'World', '!', '!') }}
one:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
run: eccho "$GITHUB_CONTEXT"
- name: Dump job context
if: failure()
env:
JOB_CONTEXT: ${{ toJSON(job) }}
run: echo "$JOB_CONTEXT"
Expand All @@ -28,6 +30,7 @@ jobs:
STEPS_CONTEXT: ${{ toJSON(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
if: always()
env:
RUNNER_CONTEXT: ${{ toJSON(runner) }}
run: echo "$RUNNER_CONTEXT"
Expand Down

0 comments on commit 61557f6

Please sign in to comment.