diff --git a/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md b/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md index e5425b553eac..a8a6c22925a5 100644 --- a/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md +++ b/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md @@ -142,6 +142,14 @@ gh run rerun --job job-id --debug {% endif %} +{% ifversion partial-reruns-with-reusable %} + +## Re-running workflows and jobs with reusable workflows + +{% data reusables.actions.partial-reruns-with-reusable %} + +{% endif %} + {% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %} ## Reviewing previous workflow runs diff --git a/content/actions/using-workflows/reusing-workflows.md b/content/actions/using-workflows/reusing-workflows.md index 1544b383b242..54c07393ae8e 100644 --- a/content/actions/using-workflows/reusing-workflows.md +++ b/content/actions/using-workflows/reusing-workflows.md @@ -310,6 +310,14 @@ For information about using the REST API to query the audit log for an organizat {% endnote %} +{% ifversion partial-reruns-with-reusable %} + +## Re-running workflows and jobs with reusable workflows + +{% data reusables.actions.partial-reruns-with-reusable %} + +{% endif %} + ## Next steps To continue learning about {% data variables.product.prodname_actions %}, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows)." diff --git a/data/features/partial-reruns-with-reusable.yml b/data/features/partial-reruns-with-reusable.yml new file mode 100644 index 000000000000..4ef640e20f1e --- /dev/null +++ b/data/features/partial-reruns-with-reusable.yml @@ -0,0 +1,6 @@ +# Issue #7062 +versions: + fpt: '*' + ghec: '*' + ghes: '>=3.5' + ghae: 'issue-7062' diff --git a/data/reusables/actions/partial-reruns-with-reusable.md b/data/reusables/actions/partial-reruns-with-reusable.md new file mode 100644 index 000000000000..4f47e93324a2 --- /dev/null +++ b/data/reusables/actions/partial-reruns-with-reusable.md @@ -0,0 +1,6 @@ +Reusable workflows from public repositories can be referenced using a SHA, a release tag, or a branch name. For more information, see ["Calling a reusable workflow"](/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow). + +When you re-run a workflow that uses a reusable workflow and the reference is not a SHA, there are some behaviors to be aware of: + +* Re-running all jobs in a workflow will use the reusable workflow from the specified reference. For more information about re-running all jobs in a workflow, see ["Re-running all the jobs in a workflow"](/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow). +* Re-running failed jobs or a specific job in a workflow will use the reusable workflow from the same commit SHA of the first attempt. For more information about re-running failed jobs in a workflow, see ["Re-running failed jobs in a workflow"](/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-failed-jobs-in-a-workflow). For more information about re-running a specific job in a workflow, see ["Re-running a specific job in a workflow"](/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-a-specific-job-in-a-workflow).