Is there a way to build all PRs to specific branches and those branches themselves?



For example, suppose that I have following branches,

  • dev-branch (default branch)
  • prod-branch
  • random-branch
  • trying-to-make-sense-branch

and I have my own fork of this repository, with following additional branches,

  • important-feature-branch
  • beautiful-feature-branch

and now, I send a PR from important-feature-branch to dev-branch.
I want to build this PR, and dev-branch, and prod-branch.
However, I cannot find a way to do this.

  1. If I turn Only build pull requests setting on, CircleCI will not build prod-branch (which is not a default branch),
  2. If I set workflows[<workflow name>].jobs[<job name>].filters.branches.only to
    - dev-branch
    - prod-branch
    , job does not start with PRs.

Is there any way to resolve this situation? (a way to execute jobs in workflow for each commits of some branches and all PRs to those branches)


Is there anyone???


Same here, looking for alternatives to do something similar via CircleCI without turning to a “hacky” solution: for now what I’ve done is to open a PR from prod-branch to a dummy branch, and block that PR from being merged. But this is less than ideal since that means that for prod-branch to be deployed there has to be a permanent opened PR.


Same here. For libraries that support multiple branches (not only master), it would be interesting to get the same behavior for all supported branches, without losing the ability to run builds on PRs too.