Skip to content

Commit 157e177

Browse files
authored
Merge pull request github#28375 from github/repo-sync
Repo sync
2 parents 2443573 + e4a6a88 commit 157e177

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

content/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,31 @@ Enabling force pushes will not override any other rules. For example, if a branc
130130

131131
If a site administrator has blocked force pushes to the default branch only, you can still enable force pushes for any other branch or tag.{% endif %}
132132

133+
{% ifversion repo-rules-required-workflows %}
134+
135+
## Require workflows to pass before merging
136+
137+
{% note %}
138+
139+
**Notes:**
140+
141+
- This rule is in public beta and subject to change.
142+
- This rule is replacing required workflows for {% data variables.product.prodname_actions %}. You can read more about this change on the [{% data variables.product.company_short %} blog](https://github.blog/changelog/2023-08-02-github-actions-required-workflows-will-move-to-repository-rules/).
143+
144+
{% endnote %}
145+
146+
You can require all changes made to a targeted branch to pass specified workflows before they can be merged. This rule can only be configured at the organization level.
147+
148+
To use this rule, you must first create a workflow file. The workflow file needs to be in a repository that matches the visibility of the repositories you want to run it in. Specifically, a public workflow can run on any repository in your organization, an internal workflow can only run on internal and private repositories, and a private workflow can only run on private repositories. For more information, see "[AUTOTITLE](/actions/using-workflows/about-workflows)."
149+
150+
If the workflow file is in an internal or private repository and you want to use the workflow in other repositories in the organization, you will need to allow access to the workflow from outside the repository. For more information, see "[Allowing access to components in an internal repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)" or "[Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
151+
152+
When you add this rule to a ruleset, you will select the source repository and the workflow you want to enforce. The workflow triggers on the `pull_request` or `merge_group` events.
153+
154+
A workflow can also block someone from creating a repository, since a workflow can't run against a repository that's being initialized. To get around this, the ruleset either needs to have "Evaluate" as the enforcement status, or someone with bypass permissions needs to create the repository and bypass the branch protection.
155+
156+
{% endif %}
157+
133158
{% ifversion repo-rules-enterprise %}
134159

135160
## Metadata restrictions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Reference: #11605
2+
# Required workflows on GitHub Actions are moving to Repository Rules
3+
versions:
4+
ghec: '*'
5+
ghes: '>=3.12'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% note %}
22

3-
**Note:** Required workflows for {% data variables.product.prodname_actions %} are in private beta and are not available for new signups.{% ifversion fpt or ghec %} On October 18th, 2023, you will no longer be able to access required workflows for {% data variables.product.prodname_actions %} and must use repository rulesets instead. You can read more about this change on the [{% data variables.product.company_short %} blog](https://github.blog/changelog/2023-08-02-github-actions-required-workflows-will-move-to-repository-rules/). For more information about repository rulesets, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)."{% endif %}
3+
**Note:** Required workflows for {% data variables.product.prodname_actions %} are in private beta and are not available for new sign ups.{% ifversion repo-rules-required-workflows %} On October 18th, 2023, you will no longer be able to access required workflows for {% data variables.product.prodname_actions %} and must use repository rulesets instead. You can read more about this change on the [{% data variables.product.company_short %} blog](https://github.blog/changelog/2023-08-02-github-actions-required-workflows-will-move-to-repository-rules/). For more information about repository rulesets, see "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)."{% endif %}
44

55
{% endnote %}

0 commit comments

Comments
 (0)