Skip to content

Commit

Permalink
wf
Browse files Browse the repository at this point in the history
  • Loading branch information
bechampion committed Apr 18, 2024
1 parent ef0a5a2 commit 41952f7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/end.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Dependent Workflow

on:
workflow_run:
workflows: ["Main Workflow"]
types:
- completed

jobs:
notify:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run a one-line script
run: echo "Hello, this is the dependent workflow running after the main workflow!"

35 changes: 35 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Main Workflow

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run a one-line script
run: echo "Hello, this is the main workflow running!"

---
name: Dependent Workflow

on:
workflow_run:
workflows: ["Main Workflow"]
types:
- completed

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run a one-line script
run: echo "Hello, this is the dependent workflow running after the main workflow!"


0 comments on commit 41952f7

Please sign in to comment.