-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4da1dfb
commit de2a70b
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: My Workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
job1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Detect something | ||
# Add your detection steps here | ||
run: echo "Detection step" | ||
|
||
- name: Trigger Job 2 | ||
if: always() # Ensure this step always runs, regardless of the previous steps' result | ||
uses: actions/github-script@v4 | ||
with: | ||
script: | | ||
const response = await github.actions.createWorkflowDispatch({ | ||
workflow_id: 'path/to/job2.yml' // Replace with the path to your Job 2 workflow YAML file | ||
}); | ||
console.log(response); | ||
job2: | ||
runs-on: ubuntu-latest | ||
needs: job1 | ||
steps: | ||
- name: Job 2 step | ||
run: echo "This is Job 2" | ||
|
||
job3: | ||
runs-on: ubuntu-latest | ||
needs: job1 | ||
steps: | ||
- name: Job 3 step | ||
run: echo "This is Job 3" |