From 17e82b96e70ebe9c228a7c7bc06948425c2e0986 Mon Sep 17 00:00:00 2001 From: Jyotsna <58063491+Josh-01@users.noreply.github.com> Date: Tue, 16 May 2023 00:31:16 +0530 Subject: [PATCH] Update Required workflow docs (#35849) Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> --- content/actions/using-workflows/required-workflows.md | 2 +- ...isabling-or-limiting-github-actions-for-your-organization.md | 2 +- .../actions/workflows/required-workflow-prerequisites.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/content/actions/using-workflows/required-workflows.md b/content/actions/using-workflows/required-workflows.md index 5bd8ada8b6..9375bb5dd3 100644 --- a/content/actions/using-workflows/required-workflows.md +++ b/content/actions/using-workflows/required-workflows.md @@ -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. diff --git a/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md b/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md index 4de69b7194..c6f4488270 100644 --- a/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md +++ b/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md @@ -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 diff --git a/data/reusables/actions/workflows/required-workflow-prerequisites.md b/data/reusables/actions/workflows/required-workflow-prerequisites.md index 4d4465184f..d61322cdd6 100644 --- a/data/reusables/actions/workflows/required-workflow-prerequisites.md +++ b/data/reusables/actions/workflows/required-workflow-prerequisites.md @@ -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.