Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 1

Actions YML: Proposal for job.<job_id>.branches

We have been migrating our HCL workflows over to the new YML workflows over the past couple of days with success. However, we are finding ourselves creating duplicative workflows with minor changes due to branch specific needs.

 

I propose we add branches filtering to jobs.

job.<job_id>.branches

 

An example of usage would be:

jobs:
  Publish:
    name: Publish Container
    runs-on: ubuntu-latest
    branches:
    - master

Additionally, we would like for branches to begin supporting a '!' syntax; for example:

jobs:
  Publish:
    name: Run long workflow not needed for master for some reason
    runs-on: ubuntu-latest
    branches:
    - !master

 

This end result will allow for one workflow to contain multiple jobs that run only when the branches requirements are met.