I have implemented ci/cd using GitHub actions. In ci/cd I have three jobs are there when I want to release a tag I want to build these three jobs and when I raise a pull request to a particular branch only two jobs should be executed for health check purposes. for example, I have a feature branch I want to merge this feature branch to the devel branch. when I raise a PR should be run only two jobs. how can I achieve this? below is my sample code.
name: CI
on:
pull_request:
branches:
- master
- devel
push:
tags:
- '*'
jobs:
build:
name: build
runs-on: self-hosted
steps:
--------------
deploy:
name: deploy
runs-on: self-hosted
steps:
------------
automation-test:
name: test
runs-on: self-hosted
steps:
------------
here when I raise a PR I want to run build and automation-test jobs.