-
Notifications
You must be signed in to change notification settings - Fork 67.1k
Clarify when private actions can be referenced directly #43969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Sharra-writes
merged 4 commits into
github:main
from
WilliamK112:docs/private-action-example-clarify
May 13, 2026
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
94c5a4a
docs(actions): clarify private action example scope
WilliamK112 3f7fc6d
Apply suggestion from @Sharra-writes
Sharra-writes e64db71
docs(actions): smooth private action transition wording
WilliamK112 93dbfa1
Merge branch 'main' into docs/private-action-example-clarify
Sharra-writes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -653,7 +653,9 @@ jobs: | |||||
|
|
||||||
| ### 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). | ||||||
|
Sharra-writes marked this conversation as resolved.
Outdated
Sharra-writes marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| 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). | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
|
||||||
|
|
||||||
| Replace `PERSONAL_ACCESS_TOKEN` in the example with the name of your secret. | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.