Skip to content

Commit

Permalink
Chaining job
Browse files Browse the repository at this point in the history
  • Loading branch information
rajurh authored Oct 10, 2022
1 parent 32c6db6 commit 9613921
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/chaining-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
run-job-3:
description: "Run job 3"
run-job-2:
description: "Run job 2"
required: true
type: boolean

Expand All @@ -22,6 +22,7 @@ jobs:

job-2:
name: Job 2
if: github.event.inputs.run-job-2 == 'true'
runs-on: ubuntu-latest
needs:
- job-1
Expand All @@ -31,10 +32,9 @@ jobs:

job-3:
name: Job 3
if: github.event.inputs.run-job-3 == 'true'
runs-on: ubuntu-latest
needs:
- job-1
- job-2
steps:
- name: Output for Job 3
run: echo "Hello from Job 3"
Expand Down

0 comments on commit 9613921

Please sign in to comment.