-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (25 loc) · 1.01 KB
/
02-run-after-another.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: 02-run-after-another
run-name: Triggered via ${{ github.event.workflow_run.name }}#${{ github.event.workflow_run.run_number }}(${{ github.event.workflow_run.id }}) for a ${{ github.event.workflow_run.event }} event
on:
workflow_run:
workflows: [01-run-on-push, 03-run-on-pull-request]
types: [completed]
jobs:
if-pr:
runs-on: ubuntu-latest
if: ${{ (github.event.workflow_run.event == 'pull_request') && (github.event.workflow_run.conclusion == 'success') }}
steps:
- run: echo 'The triggering workflow has passed and was triggered via a pull_request'
if-push:
runs-on: ubuntu-latest
if: ${{ (github.event.workflow_run.event == 'push') && (github.event.workflow_run.conclusion == 'success') }}
steps:
- run: echo 'The triggering workflow has passed and was triggered via a push'
run-after-another:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"