Skip to content

Commit

Permalink
Test the PR flow of 02-run-after-another workflow (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Mriyam Tamuli <mbtamuli@gmail.com>
  • Loading branch information
mbtamuli authored Jan 4, 2024
1 parent c61be55 commit c997c2a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/01-run-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 01-run-on-push

on:
push:
branches: [main]

jobs:
run-on-push:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/02-run-after-another.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 02-run-after-another

on:
workflow_run:
workflows: [01-run-on-push]
workflows: [01-run-on-push, 03-run-on-pull-request]
types: [completed]

jobs:
Expand All @@ -24,3 +24,5 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
- name: Test step for PR
run: echo "No op step added just for testing"
14 changes: 14 additions & 0 deletions .github/workflows/03-run-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 03-run-on-pull-request

on:
pull_request:

jobs:
run-on-pull-request:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Various proofs of concept examples using Github Actions 🤖
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| [![01-run-on-push](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/01-run-on-push.yaml/badge.svg)](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/01-run-on-push.yaml) | Runs on push event to any branch. |
| [![02-run-after-another](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/02-run-after-another.yaml/badge.svg)](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/02-run-after-another.yaml) | Run after another workflow, in this case after [01-run-on-push](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/01-run-on-push.yaml) |
| [![03-run-on-pull-request](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/03-run-on-pull-request.yaml/badge.svg)](https://github.com/mbtamuli/github-actions-pocs/actions/workflows/03-run-on-pull-request.yaml) | Runs on pull request event for any branch. |


## Reference
Expand Down

0 comments on commit c997c2a

Please sign in to comment.