diff --git a/assets/images/help/repository/enable-debug-logging.png b/assets/images/help/repository/enable-debug-logging.png
new file mode 100644
index 0000000000..01f94133ca
Binary files /dev/null and b/assets/images/help/repository/enable-debug-logging.png differ
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 77465b8e69..9888f400b5 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
@@ -17,7 +17,7 @@ versions:
## About re-running workflows and jobs
-Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. You can re-run a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.
+Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. You can re-run a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% if debug-reruns %} When you re-run a workflow or jobs in a workflow, you can enable debug logging for the re-run. This will enable runner diagnostic logging and step debug logging for the re-run. For more information about debug logging, see "[Enabling debug logging](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)."{% endif %}
## Re-running all the jobs in a workflow
@@ -37,6 +37,7 @@ Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**.

{% endif %}
+{% data reusables.actions.enable-debug-logging %}
{% endwebui %}
@@ -50,6 +51,15 @@ To re-run a failed workflow run, use the `run rerun` subcommand. Replace `run-id
gh run rerun run-id
```
+{% if debug-reruns %}
+{% data reusables.actions.enable-debug-logging-cli %}
+
+```shell
+gh run rerun run-id --debug
+```
+
+{% endif %}
+
To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list.
```shell
@@ -71,6 +81,7 @@ If any jobs in a workflow run failed, you can re-run just the jobs that failed.
{% data reusables.repositories.view-run %}
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run failed jobs**.

+{% data reusables.actions.enable-debug-logging %}
{% endwebui %}
@@ -82,6 +93,14 @@ To re-run failed jobs in a workflow run, use the `run rerun` subcommand with the
gh run rerun run-id --failed
```
+{% if debug-reruns %}
+{% data reusables.actions.enable-debug-logging-cli %}
+
+```shell
+gh run rerun run-id --failed --debug
+```
+
+{% endif %}
{% endcli %}
## Re-running a specific job in a workflow
@@ -99,6 +118,7 @@ When you re-run a specific job in a workflow, a new workflow run will start for
Alternatively, click on a job to view the log. In the log, click {% octicon "sync" aria-label="The re-run icon" %}.

+{% data reusables.actions.enable-debug-logging %}
{% endwebui %}
@@ -110,6 +130,14 @@ To re-run a specific job in a workflow run, use the `run rerun` subcommand with
gh run rerun --job job-id
```
+{% if debug-reruns %}
+{% data reusables.actions.enable-debug-logging-cli %}
+
+```shell
+gh run rerun --job job-id --debug
+```
+
+{% endif %}
{% endcli %}
{% endif %}
diff --git a/content/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging.md b/content/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging.md
index d3da891970..0f12697feb 100644
--- a/content/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging.md
+++ b/content/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging.md
@@ -22,6 +22,12 @@ These extra logs are enabled by setting secrets in the repository containing the
For more information on setting secrets, see "[Creating and using encrypted secrets](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)."
+{% if debug-reruns %}
+
+Additionally, anyone who has access to run a workflow can enable runner diagnostic logging and step debug logging for a workflow re-run. For more information, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)."
+
+ {% endif %}
+
## Enabling runner diagnostic logging
Runner diagnostic logging provides additional log files that contain information about how a runner is executing a job. Two extra log files are added to the log archive:
diff --git a/data/features/debug-reruns.yml b/data/features/debug-reruns.yml
new file mode 100644
index 0000000000..320c5e6a88
--- /dev/null
+++ b/data/features/debug-reruns.yml
@@ -0,0 +1,7 @@
+# Issue 6629
+# Enabling debug logging when re-running jobs or workflows
+versions:
+ fpt: '*'
+ ghec: '*'
+ ghes: '>=3.6'
+ ghae: 'issue-6629'
diff --git a/data/reusables/actions/enable-debug-logging-cli.md b/data/reusables/actions/enable-debug-logging-cli.md
new file mode 100644
index 0000000000..1336bef7bd
--- /dev/null
+++ b/data/reusables/actions/enable-debug-logging-cli.md
@@ -0,0 +1 @@
+To enable enable runner diagnostic logging and step debug logging for the re-run, use the `--debug` flag.
\ No newline at end of file
diff --git a/data/reusables/actions/enable-debug-logging.md b/data/reusables/actions/enable-debug-logging.md
new file mode 100644
index 0000000000..4e77950e84
--- /dev/null
+++ b/data/reusables/actions/enable-debug-logging.md
@@ -0,0 +1,4 @@
+{% if debug-reruns %}
+1. Optionally, to enable runner diagnostic logging and step debug logging for the re-run, select **Enable debug logging**.
+ 
+{% endif %}
\ No newline at end of file