I would like to have a workflow with 2 jobs. The first job should run on every branch push. The second job depends on the first job and should only be run on a master branch push. This would require the on (https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-... functionality to work at the job level.
This could also be solved if I could make a workflow depend on other workflows. That is, if the need (https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-synta... functionality worked at the workflow level.
Solved! Solved! Go to Solution.
Here is an example:
jobs: job1: steps: - run: echo "I always execute!" job2: if: github.ref == 'refs/heads/master' steps: - run: echo "I only execute on master branch!"
if: contains(github.ref, 'release')
- run: echo "I only run if the pushed branch contains 'release' in its name!