-
Select Topic AreaQuestion BodyI've got a repo with a frontend build and a server build. Each only runs when files in the appropriate folder change via the I don't see an option for doing that though. It looks like I can only set up the branch rule so that a hard-coded list of checks pass. If I put all the checks in the list that need to pass, then a web-only change would never be able to be merged because the server build never runs. This seems like it would be a common situation. Has anyone figured out how to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi Kevin, To achieve what you are describing, you can set up a branch protection rule for the master branch that requires all checks to pass before allowing a merge. Then, you can add multiple status checks for your repository in the settings. These status checks can be configured to only run on certain files or folders by using the "paths-ignore" option in the GitHub workflow files. Here are the general steps to set up the branch protection rule and status checks: Go to your repository on GitHub and click on "Settings". To make sure that your status checks only run on the appropriate files, you can configure the GitHub workflow files in your repository to use the "paths-ignore" option. For example, you could have one workflow file that only runs when changes are made to the frontend files and another workflow file that only runs when changes are made to the server files. I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The link in the accepted answer is a 404, but here's an updated link. |
Beta Was this translation helpful? Give feedback.
This is probably what you are looking for: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks#handling-skipped-but-required-checks