Order-only dependencies in workflows

I have a situation where for some branches, we want to run a job before all other jobs, and on other branches we don’t want to run it all. I’ve achieved this by defining two workflows, but it feels redundant and I was wondering if there’s a better way. Here’s what I have now:

  build_and_archive:
  jobs:
    - build:
        filters:
          branches:
            ignore: /release\/.*/
    - archive:
        filters:
          branches:
            only:
              - master
        requires:
          - build

build_and_archive_rc:
  jobs:
    - get_rc_num:
        filters:
          branches:
            only: /release\/.*/
    - build:
        name: build_rc
        requires:
          - get_rc_num
    - archive:
        requires:
          - build_rc

What I’d like is a way to have just one workflow, and specify that build should depend on get_rc_num if get_rc_num is run, but if get_rc_num is filtered out, then build should run anyway.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.