close
Skip to content

Clarify when private actions can be referenced directly#43969

Open
WilliamK112 wants to merge 2 commits intogithub:mainfrom
WilliamK112:docs/private-action-example-clarify
Open

Clarify when private actions can be referenced directly#43969
WilliamK112 wants to merge 2 commits intogithub:mainfrom
WilliamK112:docs/private-action-example-clarify

Conversation

@WilliamK112
Copy link
Copy Markdown

Fixes #34562.

Summary

  • clarify that the checkout-and-local-reference pattern is not the only option
  • point readers to the existing docs for allowing access to internal and private actions
  • keep the existing example for cases where checking out the private repository is still needed

Validation

  • git diff --check
  • verified the linked docs sections exist in content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md

Copilot AI review requested due to automatic review settings April 25, 2026 07:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
actions/reference/workflows-and-actions/workflow-syntax.md fpt
ghec
ghes@ 3.20 3.19 3.18 3.17 3.16 3.15 3.14
fpt
ghec
ghes@ 3.20 3.19 3.18 3.17 3.16 3.15 3.14

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Apr 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates workflow syntax documentation to clarify when private/internal actions can be referenced directly, while keeping the checkout-and-local-reference example for cases where it’s still required.

Changes:

  • Adds guidance that internal/private actions can sometimes be referenced directly when access is allowed.
  • Links to existing settings documentation for enabling access to internal/private components.
  • Reframes the existing example as one approach for cases requiring checkout + local reference.

Comment on lines +654 to +656
### Example: Using an action inside a different private repository than the workflow

Your workflow must checkout the private repository and reference the action locally. Generate a {% data variables.product.pat_generic %} and add the token as a secret. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
If the action is in an internal repository, or in a private repository that's configured to allow access from your workflow's repository, you can reference the action directly. For more information, see [Allowing access to components in an internal repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository) and [Allowing access to components in a private repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository).
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section title is now narrower than the guidance immediately under it (which covers internal repositories and eligible private repositories). This mismatch can confuse readers scanning headings. Consider broadening the heading (e.g., internal or private repository) or splitting into a short 'Direct reference' subsection plus the existing checkout-based example.

Copilot uses AI. Check for mistakes.
Comment thread content/actions/reference/workflows-and-actions/workflow-syntax.md Outdated
Comment thread content/actions/reference/workflows-and-actions/workflow-syntax.md Outdated
Your workflow must checkout the private repository and reference the action locally. Generate a {% data variables.product.pat_generic %} and add the token as a secret. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
If the action is in an internal repository, or in a private repository configured to allow access from your workflow's repository, you can reference the action directly. For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository) and [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository).

The following example shows one way to use an action from a different private repository when you need to check out the repository and reference the action locally. Generate a {% data variables.product.pat_generic %} and add the token as a secret. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
Copy link
Copy Markdown
Contributor

@Sharra-writes Sharra-writes Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is jumping subjects pretty abruptly with no transition. Can you let me know if this revision makes sense? (I'm a writer not an expert in this.)

Suggested change
The following example shows one way to use an action from a different private repository when you need to check out the repository and reference the action locally. Generate a {% data variables.product.pat_generic %} and add the token as a secret. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).
If the action isn't in a repository configured to allow access, you need to check out the repository and reference the action locally. Generate a {% data variables.product.pat_generic %} and add the token as a secret. The following example shows this method for referencing an action. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and [AUTOTITLE](/actions/security-guides/using-secrets-in-github-actions).

@Sharra-writes
Copy link
Copy Markdown
Contributor

@WilliamK112 Thanks for taking this on! I've just left one updated wording suggestion that I'd like your opinion on to make sure that I'm using the terminology correctly and that it still makes sense.

CnkwebB

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading section "Example: Using an action inside a different private repository than the workflow" in "Workflow Syntax"

4 participants