diff --git a/.github/workflows/Handson6.yml b/.github/workflows/Handson6.yml new file mode 100644 index 0000000..1f85026 --- /dev/null +++ b/.github/workflows/Handson6.yml @@ -0,0 +1,22 @@ +name: conditional workflow +on: + pull_request: + branches: + - 'main' + push: + +jobs: + normal_job: + runs-on: ubuntu-latest + steps: + - name: Print Step in normal job + run: | + echo "Hello From normal_job" + + pull_request_job: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Print Step in PR job + run: | + echo "Hello From pull_request_job"