@@ -13,7 +13,7 @@ topics:
|
||||
|
||||
## Overview
|
||||
|
||||
You can configure a workflow that must run in repositories in an organization for all pull requests opened against {% ifversion actions-required-workflow-improvements %}any target branch{% else %}the default branch{% endif %}. Required workflows allow you to implement organization-wide CI/CD policies that apply to current and future repositories. A required workflow is triggered by pull request events and appears as a required status check, which blocks the ability to merge the pull request until the required workflow succeeds.
|
||||
You can configure a workflow that must run in repositories in an organization for all pull requests opened against {% ifversion actions-required-workflow-improvements %}any target branch{% else %}the default branch{% endif %}. Required workflows allow you to implement organization-wide CI/CD policies that apply to current and future repositories. A required workflow is triggered by {% ifversion actions-required-workflow-improvements %}`pull_request` and `pull_request_target` default events{% else %}pull request events{% endif %} and appears as a required status check, which blocks the ability to merge the pull request until the required workflow succeeds.
|
||||
|
||||
Required workflows are not the same as reusable workflows. Reusable workflows can be called by another workflow. Required workflows are enforced on repositories by an organization owner.
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ You can configure this behavior for an organization using the procedure below. M
|
||||
|
||||
{% data reusables.actions.workflows.required-workflow-beta %}
|
||||
|
||||
You can configure required workflows to run in all or selected repositories in an organization where you are an owner. Required workflows are triggered by pull requests and must pass before a pull request can be merged. For more information, see "[AUTOTITLE](/actions/using-workflows/required-workflows)."
|
||||
You can configure required workflows to run in all or selected repositories in an organization where you are an owner. Required workflows are triggered by {% ifversion actions-required-workflow-improvements %}`pull_request` and `pull_request_target` default events{% else %}pull requests{% endif %} and must pass before a pull request can be merged. For more information, see "[AUTOTITLE](/actions/using-workflows/required-workflows)."
|
||||
|
||||
### Prerequisites
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
* For required workflows to run, the pull request's source repository must be in the same organization as the target repository. {% data variables.product.product_name %} will source the required workflow from {% ifversion actions-required-workflow-improvements %}a specified branch, tag, or commit SHA {% else %}the HEAD commit of the default branch {% endif %}from the repository containing the workflow.
|
||||
* Secrets used in a required workflow should be created at either the organization level or in the target repositories.
|
||||
* Secrets in the source repository will not be fetched when a workflow runs in the target repository.
|
||||
{% ifversion actions-required-workflow-improvements %}* When a workflow is run as a required workflow it will ignore all the filters in the `on:` section, for example: `branches`, `branches-ignore`, `paths`, `types` etc. The required workflow will run only for the `pull_request` and `pull_request_target` default events. For more information on default activity types, see "[AUTOTITLE](/actions/using-workflows/events-that-trigger-workflows#pull_request)."{% endif %}
|
||||
* Required workflows are not automatically triggered on already existing pull requests even though they automatically appear as expected checks. To trigger required workflows for an already existing pull request, push a new change to that pull request.
|
||||
|
||||
Reference in New Issue
Block a user