Skip to content

Commit

Permalink
Create split-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-moomoo authored Apr 14, 2024
1 parent 4da1dfb commit de2a70b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/split-test.yml
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"

0 comments on commit de2a70b

Please sign in to comment.