Skip to content

Commit

Permalink
add conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
daryazata committed Apr 8, 2022
1 parent 5713c11 commit 20afc0b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/context.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: Context testing
on: push
on:
- push
- pull_request

jobs:
dump_contexts_to_log:
runs-on: ubuntu-latest
if: github.event_name == "push" # will only run on 'push' event
steps:
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
- name: Dump job context
run: echo '${{ toJSON(job) }}'
run: eccho '${{ toJSON(job) }}'
- name: Dump steps context
if: failure() # this step will also run even if step before failed
run: echo '${{ toJSON(steps) }}'
- name: Dump runner context
if: always() # this step will always run
run: echo '${{ toJSON(runner) }}'
- name: Dump strategy context
run: echo '${{ toJSON(strategy) }}'
Expand Down

0 comments on commit 20afc0b

Please sign in to comment.