Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# ---------------------------------------------------------------
# To update the sha:
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260731-094650-g61ba3829f@sha256:965152ebc8311c75bc9db9fc1c178a8c04718ca5d5521c30f55ba40ef229ff4d AS base
FROM ghcr.io/github/gh-base-image/gh-base-noble:20260811-222802-g1cf85b160@sha256:235f4854c8354b24fe8fefabf31fe57239723f2e4df4fb380d50f48844ab0737 AS base

# Install curl for Node install and determining the early access branch
# Install git for cloning docs-early-access & translations repos
Expand Down
4 changes: 4 additions & 0 deletions content/actions/reference/workflows-and-actions/contexts.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ The `github` context contains information about the workflow run and the event t
| `github.actor` | `string` | The username of the user that triggered the initial workflow run. If the workflow run is a re-run, this value may differ from `github.triggering_actor`. Any workflow re-runs will use the privileges of `github.actor`, even if the actor initiating the re-run (`github.triggering_actor`) has different privileges. |
| `github.actor_id` | `string` | {% data reusables.actions.actor_id-description %} |
| `github.api_url` | `string` | The URL of the {% data variables.product.prodname_dotcom %} REST API. |
| {% ifversion actions-artifacts-file %} |
| `github.artifacts` | `string` | Path on the runner to the file that identifies workflow artifacts for the current step. Write one declaration per line to identify files or OCI digest references as workflow artifacts. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#declaring-workflow-artifacts). |
| `github.artifacts_list` | `string` | Path on the runner to a read-only file containing the aggregated workflow artifact metadata for the current job as JSON. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#reading-workflow-artifacts). |
| {% endif %} |
| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. |
| `github.env` | `string` | Path on the runner to the file that sets environment variables from workflow commands. This file is unique to the current step and is a different file for each step in a job. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable). |
| `github.event` | `object` | The full event webhook payload. You can access individual properties of the event using this context. This object is identical to the webhook payload of the event that triggered the workflow run, and is different for each event. The webhooks for each {% data variables.product.prodname_actions %} event is linked in [AUTOTITLE](/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_call). For example, for a workflow run triggered by the [`push` event](/actions/reference/workflows-and-actions/events-that-trigger-workflows#push), this object contains the contents of the [push webhook payload](/webhooks/webhook-events-and-payloads#push). |
Expand Down
4 changes: 4 additions & 0 deletions content/actions/reference/workflows-and-actions/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ We strongly recommend that actions use variables to access the filesystem rather
| `GITHUB_ACTOR` | The name of the person or app that initiated the workflow. For example, `octocat`. |
| `GITHUB_ACTOR_ID` | {% data reusables.actions.actor_id-description %} |
| `GITHUB_API_URL` | Returns the API URL. For example: `{% data variables.product.rest_url %}`. |
| {% ifversion actions-artifacts-file %} |
| `GITHUB_ARTIFACTS` | The path on the runner to the file that declares workflow artifacts for the current step. Write one declaration per line to identify files or OCI digest references as workflow artifacts. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#declaring-workflow-artifacts). |
| `GITHUB_ARTIFACTS_LIST` | The path on the runner to a read-only file that contains aggregated workflow artifact metadata for the current job as a JSON object. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#reading-workflow-artifacts). |
| {% endif %} |
| `GITHUB_BASE_REF` | The name of the base ref or target branch of the pull request in a workflow run. This is only set when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. For example, `main`. |
| `GITHUB_ENV` | The path on the runner to the file that sets variables from workflow commands. The path to this file is unique to the current step and changes for each step in a job. For example, `/home/runner/work/_temp/_runner_file_commands/set_env_87406d6e-4979-4d42-98e1-3dab1f48b13a`. For more information, see [AUTOTITLE](/actions/reference/workflows-and-actions/workflow-commands#setting-an-environment-variable). |
| `GITHUB_EVENT_NAME` | The name of the event that triggered the workflow. For example, `workflow_dispatch`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -959,3 +959,98 @@ This example demonstrates how to add the user `$env:HOMEPATH/.local/bin` directo
```

{% endpowershell %}

{% ifversion actions-artifacts-file %}

## Declaring workflow artifacts

Declare files or OCI references as workflow artifacts by writing one declaration per line to the `GITHUB_ARTIFACTS` environment file. Each step writes to a fresh, per-step file; the path is unique to that step.

Metadata about declared artifacts is collected across all steps in a job and exposed through the `GITHUB_ARTIFACTS_LIST` file.

Each line must be one of the following formats. Blank lines and lines starting with `#` are ignored.

* **File path**: A relative or absolute path to a file, optionally prefixed with `file://`. Relative paths are resolved against `GITHUB_WORKSPACE`. The path must point to an existing regular file (not a directory). The runner records the file's base name and its SHA-256 digest.
* **OCI reference**: A reference in the form `REFERENCE@ALGORITHM:HEX`, optionally prefixed with `oci://`. `REFERENCE` is the image name (including optional tag), and `ALGORITHM` must be one of `sha256`, `sha384`, or `sha512`. `HEX` must be the full lowercase digest for the algorithm: 64 hexadecimal characters for `sha256`, 96 for `sha384`, or 128 for `sha512`.

Limits:

* The per-step command file is capped at 1MiB.
* A job can accumulate up to 500 workflow artifacts across all steps.
* If the same artifact is declared more than once with identical name and digest, it is deduplicated. Conflicting declarations (same name, different digest) produce an error.

{% bash %}

```bash copy
echo "dist/my-binary" >> "$GITHUB_ARTIFACTS"
```

To declare an OCI reference:

```bash copy
echo "oci://ghcr.io/octocat/myapp:1.0.0@sha256:914b38d45a65e4263a179d9c2b09cc04dcbcaa8257fa85100cf42f9a3b408cfb" >> "$GITHUB_ARTIFACTS"
```

{% endbash %}

{% powershell %}

```powershell copy
"dist/my-binary" >> $env:GITHUB_ARTIFACTS
```

To declare an OCI reference:

```powershell copy
"oci://ghcr.io/octocat/myapp:1.0.0@sha256:914b38d45a65e4263a179d9c2b09cc04dcbcaa8257fa85100cf42f9a3b408cfb" >> $env:GITHUB_ARTIFACTS
```

{% endpowershell %}

## Reading workflow artifacts

Read the aggregated workflow artifact metadata declared by earlier steps in the current job from the `GITHUB_ARTIFACTS_LIST` environment file. This file is read-only and is updated by the runner after each step completes. It contains a UTF-8-encoded JSON object with the following structure:

```json
{
"version": 1,
"subjects": [
{
"name": "my-binary",
"digest": "sha256:abc123...",
"kind": "file"
},
{
"name": "ghcr.io/octocat/myapp:1.0.0",
"digest": "sha256:a1b2c3d4...",
"kind": "oci"
}
]
}
```

Each entry in the `subjects` array contains:

* `name`: The base name of the file or the OCI reference name (without the digest).
* `digest`: The `algorithm:hex` digest of the artifact.
* `kind`: Either `file` or `oci`.

Artifacts are sorted alphabetically by `name`.

{% bash %}

```bash copy
cat "$GITHUB_ARTIFACTS_LIST"
```

{% endbash %}

{% powershell %}

```powershell copy
Get-Content $env:GITHUB_ARTIFACTS_LIST
```

{% endpowershell %}

{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ versions:
feature: enterprise-code-rulesets
permissions: Enterprise owners
shortTitle: Create rulesets
redirect_from:
- /enterprise-onboarding/govern-people-and-repositories/protect-branches
- /enterprise-onboarding/feature-enhancements/about-rulesets
contentType: how-tos
category:
- Secure and govern your enterprise
docsTeamMetrics:
- enterprise-onboarding
---

## Introduction
Expand All @@ -17,12 +22,14 @@ category:

To learn more, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).

As you onboard your enterprise, rulesets are how you apply consistent protections across many repositories at once, rather than configuring each repository individually.

If you have used **branch protection rules** on individual repositories, rulesets serve a similar goal at enterprise scale. Unlike a branch protection rule, which applies to a single repository, a ruleset can target many organizations, repositories, and branches at the same time, and you can set it to an evaluate status to preview its impact before you enforce it.

## Importing rulesets

To import a prebuilt ruleset created by {% data variables.product.company_short %}, see [`github/ruleset-recipes`](https://github.com/github/ruleset-recipes).

{% data reusables.repositories.import-a-ruleset-conceptual %} For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#using-ruleset-history).

## How will I define where my ruleset applies?

Rulesets allow you to flexibly target the organizations, repositories, and branches where you want rules to apply.
Expand Down Expand Up @@ -62,9 +69,7 @@ The following are eligible for bypass access:
* {% data variables.copilot.copilot_cloud_agent %}. For more information about {% data variables.copilot.copilot_cloud_agent %}, see [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent#limitations-in-copilot-cloud-agents-compatibility-with-other-features).
{%- endif %}

1. To grant bypass permissions for the ruleset, in the "Bypass list" section, click **Add bypass**.

1. In the "Add bypass" modal dialog that appears, search for the role, team, or app you would like to grant bypass permissions, then select the role, team, or app from the "Suggestions" section and click Add Selected.
1. In the "Bypass list" section, click **Add bypass**, then search for and select the role, team, or app you want to grant bypass permissions, and click **Add Selected**.

{% data reusables.repositories.rulesets-branch-tag-bypass-optional-step %}

Expand Down Expand Up @@ -125,8 +130,7 @@ You can grant certain roles, teams, or apps bypass permissions as well as the ab
* {% data variables.copilot.copilot_cloud_agent %}. For more information about {% data variables.copilot.copilot_cloud_agent %}, see [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent#limitations-in-copilot-cloud-agents-compatibility-with-other-features).
{%- endif %}

1. To grant bypass permissions for the ruleset, in the "Bypass list" section, click **Add bypass**.
1. In the "Add bypass" modal dialog that appears, search for the role, team, or app you would like to grant bypass permissions, then select the role, team, or app from the "Suggestions" section and click Add Selected.
1. In the "Bypass list" section, click **Add bypass**, then search for and select the role, team, or app you want to grant bypass permissions, and click **Add Selected**.

### Choosing which organizations to target in your enterprise

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For information about additional {% data variables.product.prodname_copilot_shor

## Security considerations

When you @mention {% data variables.product.prodname_copilot_short %} in Slack, consider the following.
Before you @mention the {% data variables.product.prodname_github_app %} in Slack, consider the following.

* {% data variables.product.prodname_copilot_short %} may perform write actions on your behalf, such as creating pull requests or issues, in addition to answering questions. {% data variables.product.prodname_copilot_short %} uses the permissions of your linked {% data variables.product.github %} account for any actions it takes.
* {% data variables.copilot.copilot_cloud_agent %} will capture the entire thread as context for your request, understanding and implementing solutions based on the discussion. This context is stored in the pull request. If you want to limit the context, you can send a direct message to the {% data variables.product.prodname_github_app %} for Slack instead.
Expand All @@ -40,7 +40,7 @@ When you @mention {% data variables.product.prodname_copilot_short %} in Slack,

The first time you use the {% data variables.product.prodname_github_app %} in Slack, the app will prompt you to connect it to your {% data variables.product.github %} account and set a default repository. The default repository is where pull requests created by {% data variables.copilot.copilot_cloud_agent %} sessions will be opened.

1. In Slack, open a direct message with the {% data variables.product.prodname_github_app %} or mention {% data variables.product.prodname_copilot_short %} in a thread by typing `@{% data variables.product.prodname_copilot %}`.
1. In Slack, open a direct message with the {% data variables.product.prodname_github_app %} or mention the {% data variables.product.prodname_github_app %} in a thread by typing `@{% data variables.product.github %}`.
1. Send a prompt to {% data variables.copilot.copilot_cloud_agent %}. This can be a request to perform a task, or simply `login`.
1. If asked to connect your {% data variables.product.github %} account, follow the instructions in {% data variables.product.prodname_copilot_short %}'s reply and authorize the app to access your {% data variables.product.github %} account.
1. In the Slack message thread, click **Configure settings** to set a default repository for pull requests. You can change this repository later using the `settings` command.
Expand Down

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions content/enterprise-onboarding/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ journeyTracks:
- href: '/admin/concepts/security-and-compliance/enterprise-policies'
- href: '/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/managing-custom-properties-for-repositories-in-your-enterprise'
- href: '/admin/managing-accounts-and-repositories/managing-repositories-in-your-enterprise/governing-how-people-use-repositories-in-your-enterprise'
- href: '/enterprise-onboarding/govern-people-and-repositories/protect-branches'
- href: '/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-governance'
- href: '/admin/concepts/security-and-compliance/audit-log-for-an-enterprise'
- id: 'github_apps'
title: 'Automating processes with GitHub Apps'
Expand All @@ -43,11 +43,11 @@ journeyTracks:
- href: '/apps/using-github-apps/installing-a-github-app-on-your-enterprise'
versions:
ghec: '*'
children:
- /govern-people-and-repositories
children: []
redirect_from:
- /enterprise-onboarding/feature-enhancements
- /enterprise-onboarding/getting-started-with-your-enterprise
- /enterprise-onboarding/govern-people-and-repositories
docsTeamMetrics:
- enterprise-onboarding
---
6 changes: 6 additions & 0 deletions content/rest/guides/working-with-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ end

Note that this API call will retrieve single line comments, as well as comments made
on the entire commit.

{% ifversion ghes > 3.21 %}

Creating commit comments can be enabled or disabled for a repository. Organization owners can configure the default setting for repositories in their organization. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-commit-comments-for-your-organization).

{% endif %}
6 changes: 6 additions & 0 deletions data/features/actions-artifacts-file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Reference: actions/runner#4527
# Versioning for the GITHUB_ARTIFACTS and GITHUB_ARTIFACTS_LIST environment files.
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.22'
Loading