Beta Release - Requiring workflows with Repository Rulesets! #67754
Replies: 16 comments 51 replies
|
Any timeline when this will be added to Rules API? |
|
Do you have any tips on debugging the error:
(The workflow I'm configuring already works as a "Required Workflow", so its visibility and permissions are configured according to the docs). |
|
Does this feature work with workflow files that are in other organization |
|
This feature only appears to work if the workflows are stored in a public repo? We only use private repositories. Is there a reason why this feature wasn't designed to work with private repos? |
|
We are in the process of migrating from required workflows to repository rulesets and discovered one limitation. We need our workflow to run on forked repositories and access a secret, which is why we used the trigger |
|
Previously, I would store the required workflows in a directory other than When moving this into I can work around this with a repository name check in a job-level |
|
It seems that currently an extra check is added to each PR/commit(?) that this is configured to run on. This adds a lot of visual clutter when you have 2+ ruleset workflows. i.e. if we have a
Is there any chance it be changed to only show one of these? |
|
hi there. is there any workaround to handle this while we don't have option to use we use
|
|
An issue I've encountered is that PRs created by Actions workflows don't trigger the required checks to run. This has long been a problem, and before this I've been able to work around it by running those workflows manually. With these required workflows however the status doesn't seem to be tied to the commit status, and is instead some kind of PR status that can't be changed by manually running the workflow outside of the PR. For example, the checks in MetOffice/CSET#203 were manually run in MetOffice/CSET/actions/runs/6455607589 but that hasn't marked the status as suceeded. I guess the two issues here are that it doesn't pick up when the commits do pass the checks, and that automatically generated PRs can't be merged as the workflow doesn't run. |
|
@tonyjcamp will |
|
@tonyjcamp is there plans to support any other events, I'm looking at |
|
Does this feature work for the |
|
Does the ruleset modify the workflow type configuration. For instance I've created a workflow that should only be triggered on Any ideas to setup rulesets like this? Not required but run everywhere on a specific event type? |
|
@tonyjcamp This seems like a good place to ask if this feature will ever support compatibility with the Let's say we have a workflow that should run on PRs to main, only when Python files have changed: name: CI
on:
pull_request:
branches:
- main
paths:
- "**/*.py"
jobs:
lint:
name: Lint
# ...And let's also say we set a status check that targets In a situation where we have a PR to main with no changes to Python files, the PR will be blocked by this status check, but no job is going to run to mark it as successful or failed (the message shows Expected — Waiting for status to be reported). Example images of the current behavior are shown below: Current workarounds (like the one in the StackOverflow question) include not setting the It would be amazing if skipped checks could be simply marked as successful, or perhaps even extend the workflows API to choose what to report as an skipped status check (success or failure). |
|
Hello @tonyjcamp ! When a developer makes a development and uploads his changes to the repository, it is necessary to make a PR to the main branch, and for there to be a code reviewer. Here we have a ruleset in the organization so that all the repositories maintain the same rules. We created a workflow so that there is an approval by the QA team, and they have read-only permissions within the repositories. The workflow handles these conditions:
And that triggers the workflow within the repository, but it acts as a: on:
issue_comment:
types: [created, edited]
permissions:
contents: write
statuses: write
pull-requests: readThis guarantees that it has passed the necessary tests. But it is not functional for us within the rulesets, because the event is not started with a , with pull_request, pull_request_target or merge_group, but it is started with an issue_comment Have you considered adding more events? This would help us a lot to not add that workflow to each of the repositories that we have within the organization, and thus the maintenance would be less. |






Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Requiring workflows with Repository Rulesets is now available in beta!
Available in public beta today, GitHub organization administrators on Enterprise Cloud plans can set up and require workflows to run and pass before a pull request can be merged into an organization’s repositories. This can be enabled with Repository Rulesets!
This idea may sound familiar - it was originally introduced in beta as Actions Required Workflows. After receiving feedback from early users we saw an opportunity to improve the experience by moving this functionality to be a part of Repository Rulesets. Not only do Repository Rulesets enhance the experience of setting up and managing these workflows but it also provides organization administrators with several other benefits like branch targeting, bypass rules and dry running rules in an evaluation mode.
Getting Started
Step 1 - If you haven’t already, check out the documentation for Repository Rulesets
Step 2 - Learn more about requiring workflows with Repository Rulesets
Step 3 - After you’ve set up a few required workflows, leave us some feedback.
Leaving Feedback
It’s so important to us that we know things are working as expected and we’re solving the right use cases as we get closer to moving this feature from Public Beta to releasing it to the general public.
Did you find a strange bug? Use this discussion to tell us!
Did you notice an area of improvement? Use this discussion to tell us!
Do you have a general question about the feature? Use this discussion to… ask us!
With that said, your feedback means the world to us! We hope you’ll take the time to share your thoughts with the team.
All reactions