Skip to content

Commit

Permalink
Merge pull request github#36009 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Jan 21, 2025
2 parents c7d69c9 + a76f359 commit 429c64b
Show file tree
Hide file tree
Showing 93 changed files with 113 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For more information about installing and using self-hosted runners, see [AUTOTI
* Are customizable to your hardware, operating system, software, and security requirements.
* Don't need to have a clean instance for every job execution.
* Are free to use with {% data variables.product.prodname_actions %}, but you are responsible for the cost of maintaining your runner machines.{% ifversion ghec or ghes %}
* Can be organized into groups to restrict access to specific {% ifversion restrict-groups-to-workflows %}workflows, {% endif %}organizations and repositories. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).{% endif %}
* Can be organized into groups to restrict access to specific workflows, organizations, and repositories. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).{% endif %}

## Requirements for self-hosted runner machines

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ For runner groups in an organization, you can change what repositories in the or
{% data reusables.actions.runner-groups-org-navigation %}
{% data reusables.actions.changing-repository-access-for-a-runner-group %}

{% ifversion restrict-groups-to-workflows %}
{% ifversion ghec or ghes %}

## Changing which workflows can access a runner group

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ shortTitle: Label runners

{% data reusables.actions.enterprise-github-hosted-runners %}

For information on how to use labels to route jobs to specific types of self-hosted runners, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/using-self-hosted-runners-in-a-workflow). {% ifversion target-runner-groups %}You can also route jobs to runners in a specific group. For more information, see [AUTOTITLE](/actions/using-jobs/choosing-the-runner-for-a-job#targeting-runners-in-a-group).{% endif %}
For information on how to use labels to route jobs to specific types of self-hosted runners, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/using-self-hosted-runners-in-a-workflow). You can also route jobs to runners in a specific group. For more information, see [AUTOTITLE](/actions/using-jobs/choosing-the-runner-for-a-job#targeting-runners-in-a-group).

{% data reusables.actions.self-hosted-runner-management-permissions-required %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Using self-hosted runners in a workflow
intro: 'To use self-hosted runners in a workflow, you can use labels{% ifversion target-runner-groups %} or groups{% endif %} to specify the runner for a job.'
intro: 'To use self-hosted runners in a workflow, you can use labels or groups to specify the runner for a job.'
redirect_from:
- /github/automating-your-workflow-with-github-actions/using-self-hosted-runners-in-a-workflow
- /actions/automating-your-workflow-with-github-actions/using-self-hosted-runners-in-a-workflow
Expand All @@ -15,7 +15,7 @@ shortTitle: Use runners in a workflow

{% data reusables.actions.enterprise-github-hosted-runners %}

You can target self-hosted runners for use in a workflow based on the labels assigned to the runners{% ifversion target-runner-groups %}, or their group membership, or a combination of these{% endif %}.
You can target self-hosted runners for use in a workflow based on the labels assigned to the runners, or their group membership, or a combination of these.

>[!IMPORTANT]Runner Scale Sets do not support multiple labels, only the name of the runner can be used in place of a label. See [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller).
Expand All @@ -27,8 +27,6 @@ Labels allow you to send workflow jobs to specific types of self-hosted runners,

For information on creating custom and default labels, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/using-labels-with-self-hosted-runners).

{% ifversion target-runner-groups %}

## About self-hosted runner groups

For self-hosted runners defined at the organization {% ifversion ghec or ghes %}or enterprise levels{% else %}level{% endif %}, you can group your runners with shared characteristics into a single runner group and then configure your job to target the runner group.
Expand All @@ -37,8 +35,6 @@ To specify a self-hosted runner group for your job, configure `runs-on.group` in

For information on creating and managing runner groups, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).

{% endif %}

{% ifversion repository-actions-runners %}

## Viewing available runners for a repository
Expand Down Expand Up @@ -95,8 +91,6 @@ runs-on: [self-hosted, linux, x64, gpu]

These labels operate cumulatively, so a self-hosted runner must have all four labels to be eligible to process the job.

{% ifversion target-runner-groups %}

## Using groups to route jobs

{% data reusables.actions.jobs.example-runs-on-groups %}
Expand All @@ -105,13 +99,11 @@ These labels operate cumulatively, so a self-hosted runner must have all four la

{% data reusables.actions.jobs.example-runs-on-labels-and-groups %}

{% endif %}

## Routing precedence for self-hosted runners

When routing a job to a self-hosted runner, {% data variables.product.prodname_dotcom %} looks for a runner that matches the job's `runs-on` labels{% ifversion target-runner-groups %} and groups{% endif %}:
When routing a job to a self-hosted runner, {% data variables.product.prodname_dotcom %} looks for a runner that matches the job's `runs-on` labels and groups:

* If {% data variables.product.prodname_dotcom %} finds an online and idle runner that matches the job's `runs-on` labels{% ifversion target-runner-groups %} and groups{% endif %}, the job is then assigned and sent to the runner.
* If {% data variables.product.prodname_dotcom %} finds an online and idle runner that matches the job's `runs-on` labels and groups, the job is then assigned and sent to the runner.
* If the runner doesn't pick up the assigned job within 60 seconds, the job is re-queued so that a new runner can accept it.
* If {% data variables.product.prodname_dotcom %} doesn't find an online and idle runner that matches the job's `runs-on` labels {% ifversion target-runner-groups %} and groups{% endif %}, then the job will remain queued until a runner comes online.
* If {% data variables.product.prodname_dotcom %} doesn't find an online and idle runner that matches the job's `runs-on` labels and groups, then the job will remain queued until a runner comes online.
* If the job remains queued for more than 24 hours, the job will fail.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@ You can also disable and enable a workflow using the REST API. For more informat
1. In the left sidebar, click the workflow you want to disable.
1. Click {% octicon "kebab-horizontal" aria-label="Show workflow options" %} to display a dropdown menu and click **Disable workflow**.

{% ifversion workflow-nav-2022 -%}
![Screenshot of a workflow. The "Show workflow options" button, shown with a kebab icon, and the "Disable workflow" menu item are outlined in orange.](/assets/images/help/repository/actions-disable-workflow-2022.png)
{%- else -%}
![Screenshot of a workflow. Features apart from the "Disable workflow" menu item are grayed out.](/assets/images/help/repository/actions-disable-workflow.png)

The disabled workflow is marked {% octicon "stop" aria-label="The stop icon" %} to indicate its status.

![Screenshot showing the actions list. The name of the disabled "Greet Everyone" workflow is prefixed with a stop icon.](/assets/images/help/repository/actions-find-disabled-workflow.png)
{%- endif %}

{% endwebui %}

Expand All @@ -70,11 +62,8 @@ You can re-enable a workflow that was previously disabled.
{% data reusables.repositories.actions-tab %}
1. In the left sidebar, click the workflow you want to enable.

{% ifversion workflow-nav-2022 -%}
![Screenshot of the "Actions" page. In the left sidebar, a workflow name is highlighted with an outline in dark orange.](/assets/images/help/repository/actions-select-disabled-workflow-2022.png)
{%- else -%}
![Screenshot of the "Actions" page. Features are grayed out apart from one workflow name in the left sidebar.](/assets/images/help/repository/actions-select-disabled-workflow.png)
{%- endif %}

1. Click **Enable workflow**.

{% endwebui %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ To trigger the `workflow_dispatch` event, your workflow must be in the default b
{% data reusables.repositories.actions-tab %}
1. In the left sidebar, click the name of the workflow you want to run.

{% ifversion workflow-nav-2022 -%}
![Screenshot of the "Actions" page. In the left sidebar, a workflow name is highlighted with an outline in dark orange.](/assets/images/help/repository/actions-select-workflow-2022.png)
{%- else -%}
![Screenshot of the "Actions" page. Features apart from one workflow in the left sidebar are grayed out.](/assets/images/help/repository/actions-select-workflow.png)
{%- endif %}

1. Above the list of workflow runs, click the **Run workflow** button.

> [!NOTE]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Re-running workflows and jobs
shortTitle: Re-run workflows and jobs
intro: 'You can re-run a workflow run{% ifversion re-run-jobs %}, all failed jobs in a workflow run, or specific jobs in a workflow run{% endif %} up to 30 days after its initial run.'
intro: 'You can re-run a workflow run, all failed jobs in a workflow run, or specific jobs in a workflow run up to 30 days after its initial run.'
permissions: People with write permissions to a repository can re-run workflows in the repository.
redirect_from:
- /actions/managing-workflow-runs/re-running-a-workflow
Expand All @@ -16,7 +16,7 @@ versions:

## About re-running workflows and jobs

Re-running a workflow{% ifversion 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. The workflow will use the privileges of the actor who initially triggered the workflow, not the privileges of the actor who initiated the re-run. You can re-run a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% ifversion re-run-jobs %} You cannot re-run jobs in a workflow once its logs have passed their retention limits. For more information, see [AUTOTITLE](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy).{% endif %} 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 [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging).
Re-running a workflow or jobs in a workflow uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. The workflow will use the privileges of the actor who initially triggered the workflow, not the privileges of the actor who initiated the re-run. You can re-run a workflow or jobs in a workflow for up to 30 days after the initial run. You cannot re-run jobs in a workflow once its logs have passed their retention limits. For more information, see [AUTOTITLE](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy). 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 [AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)

## Re-running all the jobs in a workflow

Expand Down Expand Up @@ -60,8 +60,6 @@ gh run watch

{% endcli %}

{% ifversion re-run-jobs %}

## Re-running failed jobs in a workflow

If any jobs in a workflow run failed, you can re-run just the jobs that failed. When you re-run failed jobs in a workflow, a new workflow run will start for all failed jobs and their dependents. Any outputs for any successful jobs in the previous workflow run will be used for the re-run. Any artifacts that were created in the initial run will be available in the re-run. Any deployment protection rules that passed in the previous run will automatically pass in the re-run.
Expand Down Expand Up @@ -125,16 +123,10 @@ gh run rerun --job JOB_ID --debug

{% endcli %}

{% endif %}

{% ifversion partial-reruns-with-reusable %}

## Re-running workflows and jobs with reusable workflows

{% data reusables.actions.partial-reruns-with-reusable %}

{% endif %}

## Reviewing previous workflow runs

You can view the results from your previous attempts at running a workflow. You can also view previous workflow runs using the API. For more information, see [AUTOTITLE](/rest/actions/workflow-runs#get-a-workflow-run).
Expand All @@ -143,8 +135,4 @@ You can view the results from your previous attempts at running a workflow. You
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{%- ifversion re-run-jobs %}
1. To the right of the run name, select the **Latest** dropdown menu and click a previous run attempt.
{%- else %}
1. In the left pane, click a previous run attempt.
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ versions:
ghes: '*'
ghec: '*'
---

{% data reusables.actions.enterprise-github-hosted-runners %}

You can see whether a workflow run is in progress or complete from the workflow run page. You must be logged in to a {% data variables.product.prodname_dotcom %} account to view workflow run information, including for public repositories. For more information, see [AUTOTITLE](/get-started/learning-about-github/access-permissions-on-github).
Expand Down Expand Up @@ -61,13 +61,9 @@ You can download the log files from your workflow run. You can also download a w

![Screenshot of the log for a job. In the header, a gear icon is outlined in dark orange.](/assets/images/help/actions/download-logs-drop-down.png)

{% ifversion re-run-jobs %}

> [!NOTE]
> When you download the log archive for a workflow that was partially re-run, the archive only includes the jobs that were re-run. To get a complete set of logs for jobs that were run from a workflow, you must download the log archives for the previous run attempts that ran the other jobs.
{% endif %}

## Deleting logs

You can delete the log files from your workflow runs through the {% data variables.product.prodname_dotcom %} web interface or programmatically. {% data reusables.repositories.permissions-statement-write %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ For third-party images, such as the images for ARM-powered runners, you can find

{% data reusables.actions.disable-selfhosted-runners-crossrefs %}

When a self-hosted runner is defined at the organization or enterprise level, {% data variables.product.github %} can schedule workflows from multiple repositories onto the same runner. Consequently, a security compromise of these environments can result in a wide impact. To help reduce the scope of a compromise, you can create boundaries by organizing your self-hosted runners into separate groups. You can restrict what {% ifversion restrict-groups-to-workflows %}workflows, {% endif %}organizations and repositories can access runner groups. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).
When a self-hosted runner is defined at the organization or enterprise level, {% data variables.product.github %} can schedule workflows from multiple repositories onto the same runner. Consequently, a security compromise of these environments can result in a wide impact. To help reduce the scope of a compromise, you can create boundaries by organizing your self-hosted runners into separate groups. You can restrict what {% ifversion ghec or ghes %}workflows, {% endif %}organizations and repositories can access runner groups. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).

You should also consider the environment of the self-hosted runner machines:
* What sensitive information resides on the machine configured as a self-hosted runner? For example, private SSH keys, API access tokens, among others.
Expand Down
6 changes: 1 addition & 5 deletions content/actions/sharing-automations/reusing-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,12 @@ For information about using the REST API to query the audit log for an organizat
> [!NOTE]
> Audit data for `prepared_workflow_job` can only be viewed using the REST API. It is not visible in the {% data variables.product.prodname_dotcom %} web interface, or included in JSON/CSV exported audit data.

{% 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 [AUTOTITLE](/actions/using-workflows/events-that-trigger-workflows).

{% ifversion restrict-groups-to-workflows %}You can standardize deployments by creating a self-hosted runner group that can only execute a specific reusable workflow. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).{% endif %}
{% ifversion ghec or ghes %}You can standardize deployments by creating a self-hosted runner group that can only execute a specific reusable workflow. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/managing-access-to-self-hosted-runners-using-groups).{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For runner groups in an organization, you can change what repositories in the or
{% data reusables.actions.runner-groups-org-navigation %}
{% data reusables.actions.changing-repository-access-for-a-runner-group %}

{% ifversion restrict-groups-to-workflows %}
{% ifversion ghec %}

## Changing which workflows can access a runner group

Expand Down
Loading

0 comments on commit 429c64b

Please sign in to comment.