0

I am very much new to GitHub, I have been using GitLab so far for deployments. I have a GitHub actions pipeline, github_pip.yml which has pipeline code. Now when I am merging request to develop branch it's not running any jobs for both develop and prod. Now I want it to run DEV related jobs when there are changes made in develop and prod related jobs when changes made in prod branch.

The structure of my code is as below

name: 
on: 
  pull_request: 
      branches: 
      - develop
      - master
      
jobs:
  build-dev:
   if: github.event_name == 'pull_request' && github.ref =='refs/heads/develop'
   runs-on: 
   steps:
      

  build_prod:
   if: github.event_name == 'pull_request' && github.ref =='refs/heads/master'
   runs-on:
   steps:
      

  deploy_dev: 
    env: 
    needs: build-dev
    if: github.event_name == 'pull_request' && github.ref == 'refs/heads/develop'
    runs-on: 
    steps: 

  deploy_prod: 
    env: 
    needs: build_prod
    if: github.event_name == 'pull_request' && github.ref == 'refs/heads/master'
    runs-on: 
    steps: 

Please let me know if this seems confusing or if any updation is needed in my question. Thank you

user18148705
  • 215
  • 1
  • 11

0 Answers0