Skip to content

Commit b838db8

Browse files
authored
Documentation for GitHub Actions required workflow deprecation (#48981)
1 parent 285e455 commit b838db8

10 files changed

Lines changed: 31 additions & 31 deletions

File tree

content/actions/using-workflows/required-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Required workflows
33
shortTitle: Required workflows
44
intro: You can specify which workflows will run as required status checks in all repositories or selected repositories in your organization.
55
versions:
6-
feature: required-workflows
7-
permissions: Because this feature is being deprecated, this article is only relevant if you are already using required workflows for {% data variables.product.prodname_actions %}.
6+
feature: required-workflows-deprecation
7+
permissions: Because {% data variables.product.company_short %} no longer supports this feature, this article is only relevant if you are already using required workflows for {% data variables.product.prodname_actions %}.
88
type: how_to
99
topics:
1010
- Workflows

content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The best practices you should take will depend on whether you use {% data variab
8585

8686
If you use {% data variables.product.prodname_actions %} to access the {% data variables.dependency-submission-api.name %} or the dependency review API:
8787
- Make sure you run all of your dependency submission actions in the same {% data variables.product.prodname_actions %} workflow as your {% data variables.dependency-review.action_name %}. This will give you control over the order of execution, and it will ensure that dependency review will always work.
88-
- If you do choose to run the {% data variables.dependency-review.action_name %} separately, for instance, as a required workflow, you should:
88+
- If you do choose to run the {% data variables.dependency-review.action_name %} separately, you should:
8989
- Set `retry-on-snapshot-warnings` to `true`.
9090
- Set `retry-on-snapshot-warnings-timeout` to slightly exceed the typical run time (in seconds) of your longest-running dependency submission action.
9191

content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ You can configure this behavior for an organization using the procedure below. M
101101
{% data reusables.actions.workflow-run-approve-link %}
102102
{% endif %}
103103

104-
{% ifversion required-workflows %}
104+
{% ifversion required-workflows-deprecation %}
105105

106106
## Adding a required workflow to an organization
107107

content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ If there is a conflict between the test merge commit and head commit, the checks
5555

5656
**Warning:** If a workflow is skipped due to [path filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore), [branch filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore) or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
5757

58-
For this reason you should not use path or branch filtering to skip workflow runs if the workflow is required. For more information, see "[AUTOTITLE](/actions/managing-workflow-runs/skipping-workflow-runs){% ifversion required-workflows %}" and "[AUTOTITLE](/actions/using-workflows/required-workflows){% endif %}."
58+
{% data reusables.pull_requests.path-filtering-required-workflows %}
5959

6060
If, however, a job within a workflow is skipped due to a conditional, it will report its status as "Success". For more information, see "[AUTOTITLE](/actions/using-jobs/using-conditions-to-control-job-execution)."
6161

@@ -91,7 +91,7 @@ jobs:
9191
9292
Due to [path filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore), a pull request that only changes a file in the root of the repository will not trigger this workflow and is blocked from merging. On the pull request, you would see "Waiting for status to be reported."
9393
94-
It is recommended that you do not use path filtering (as shown in the previous example), or branch filtering, in a workflow that has been configured to be required. {% ifversion required-workflows %}For more information, see "[AUTOTITLE](/actions/using-workflows/required-workflows)."{% endif %}
94+
{% data reusables.pull_requests.path-filtering-required-workflows %}
9595
9696
## Required status checks from unexpected sources
9797

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,6 @@ If a site administrator has blocked force pushes to the default branch only, you
148148

149149
## Require workflows to pass before merging
150150

151-
{% note %}
152-
153-
**Note:** 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/).
154-
155-
{% endnote %}
156-
157151
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.
158152

159153
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)."
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Issue 10754
2+
# Versioning for deprecating the GitHub Actions required workflows docs
3+
versions:
4+
ghes: '< 3.12'
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{% note %}
22

3-
**Note:** {% data variables.product.company_short %} is deprecating support for required workflows for {% data variables.product.prodname_actions %}.{% ifversion repo-rules-required-workflows %} Use repository rulesets instead.
3+
**Note:** {% data variables.product.company_short %} no longer supports required workflows for {% data variables.product.prodname_actions %}. To require workflows to pass before merging, upgrade {% data variables.location.product_location %} to the latest version and use repository rulesets instead.
44

5-
For more information about repository rulesets, see "[AUTOTITLE](/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)." 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/).{% endif %}{% ifversion fpt %} Upgrade to {% data variables.product.prodname_ghe_cloud %} and use repository rulesets instead. For more information, see "[AUTOTITLE](/billing/managing-the-plan-for-your-github-account/upgrading-your-accounts-plan)."
5+
For more information about upgrading {% data variables.location.product_location %}, see "[AUTOTITLE](/admin/overview/about-upgrades-to-new-releases)."
66

7-
For more information about repository rulesets, see "[AUTOTITLE](/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)." 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/).
8-
{% endif %}
7+
For more information about repository rulesets, see "[AUTOTITLE](/enterprise-server@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)."
98

109
{% endnote %}

data/reusables/actions/workflows/section-triggering-a-workflow-branches.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@ The patterns defined in `branches` are evaluated against the Git ref's name. For
1818
on:
1919
pull_request:
2020
# Sequence of patterns matched against refs/heads
21-
branches:
21+
branches:
2222
- main
2323
- 'mona/octocat'
2424
- 'releases/**'
2525
```
2626
27-
{% note %}
27+
{% data reusables.pull_requests.path-filtering-required-workflows %}
2828
29-
**Note:** {% ifversion required-workflows %}You should not use branch filtering to skip workflow runs if the workflow has been configured to be required. For more information, see "[AUTOTITLE](/actions/using-workflows/required-workflows)."
30-
31-
{% endif %}If a workflow is skipped due to branch filtering, [path filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore), or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
32-
33-
{% endnote %}
29+
If a workflow is skipped due to branch filtering, [path filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore), or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
3430
3531
#### Example: Excluding branches
3632
@@ -43,7 +39,7 @@ When a pattern matches the `branches-ignore` pattern, the workflow will not run.
4339
on:
4440
pull_request:
4541
# Sequence of patterns matched against refs/heads
46-
branches-ignore:
42+
branches-ignore:
4743
- 'mona/octocat'
4844
- 'releases/**-alpha'
4945
```
@@ -64,7 +60,7 @@ The following workflow will run on `pull_request` events for pull requests that
6460
```yaml
6561
on:
6662
pull_request:
67-
branches:
63+
branches:
6864
- 'releases/**'
6965
- '!releases/**-alpha'
7066
```

data/reusables/actions/workflows/section-triggering-a-workflow-paths.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,9 @@ on:
2727
- '**.js'
2828
```
2929
30-
{% note %}
31-
32-
**Note:** {% ifversion required-workflows %}You should not use path filtering to skip workflow runs if the workflow has been configured to be required. For more information, see "[AUTOTITLE](/actions/using-workflows/required-workflows)."
30+
{% data reusables.pull_requests.path-filtering-required-workflows %}
3331
34-
{% endif %}If a workflow is skipped due to path filtering, [branch filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore), or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
35-
36-
{% endnote %}
32+
If a workflow is skipped due to path filtering, [branch filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore), or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
3733
3834
#### Example: Excluding paths
3935
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% ifversion required-workflows-deprecation %}
2+
3+
You should not use path or branch filtering to skip workflow runs if the workflow is required. For more information, see "[AUTOTITLE](/actions/managing-workflow-runs/skipping-workflow-runs){% ifversion required-workflows %}" and "[AUTOTITLE](/actions/using-workflows/required-workflows){% endif %}."
4+
5+
{% endif %}
6+
7+
{% ifversion repo-rules-required-workflows %}
8+
9+
You should not use path or branch filtering to skip workflow runs if the workflow is required to pass before merging. For more information, see "[AUTOTITLE](/actions/managing-workflow-runs/skipping-workflow-runs)" and "[AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-workflows-to-pass-before-merging)."
10+
11+
{% endif %}

0 commit comments

Comments
 (0)