1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Hack week 2025: remove unneeded FBV instances (18) - Packages & PATs (#54010)

This commit is contained in:
mc
2025-01-21 08:48:41 +00:00
committed by GitHub
parent 392b52aa91
commit a76f3595ed
20 changed files with 18 additions and 81 deletions

View File

@@ -123,14 +123,10 @@ gh run rerun --job JOB_ID --debug
{% endcli %}
{% 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).

View File

@@ -430,14 +430,10 @@ 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).

View File

@@ -2,16 +2,17 @@
title: Enforcing policies for personal access tokens in your enterprise
intro: 'Enterprise owners can control access to resources by applying policies to {% data variables.product.pat_generic_plural %}'
versions:
feature: pat-v2-enterprise
ghec: '*'
ghes: '*'
shortTitle: '{% data variables.product.pat_generic_caps %} policies'
redirect_from:
- /admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-personal-access-tokens-in-your-enterprise
---
> [!NOTE]
> {% data reusables.user-settings.pat-v2-beta %}
> {% data reusables.user-settings.pat-v2-beta %}
>
> During the {% data variables.release-phases.public_preview %}, enterprises must opt in to {% data variables.product.pat_v2_plural %}. If your enterprise has not already opted-in, then you will be prompted to opt-in and set policies when you follow the steps below.
> During the {% data variables.release-phases.public_preview %}, enterprises must opt in to {% data variables.product.pat_v2_plural %}. If your enterprise has not already opted-in, then you will be prompted to opt-in and set policies when you follow the steps below.
>
> Organizations within an enterprise can opt in to {% data variables.product.pat_v2_plural %}, even if the enterprise has not. All users, including {% data variables.product.prodname_emus %}, can create {% data variables.product.pat_v2_plural %} that can access resources owned by the user (such as repositories created under their account) regardless of the enterprise's opt in status.

View File

@@ -19,12 +19,8 @@ When organization members create a {% data variables.product.pat_v2 %} to access
> [!NOTE]
> Only {% data variables.product.pat_v2 %}s, not {% data variables.product.pat_v1_plural %}, are subject to approval. Unless the organization has restricted access by {% data variables.product.pat_v1_plural %}, any {% data variables.product.pat_v1 %} can access organization resources without prior approval. For more information, see [AUTOTITLE](/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).
{% ifversion pat-v2-org-admin-api %}
Organization owners can also use the REST API to review and manage {% data variables.product.pat_v2 %} requests. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see [AUTOTITLE](/rest/orgs/orgs#list-requests-to-access-organization-resources-with-fine-grained-personal-access-tokens).
{% endif %}
## Managing {% data variables.product.pat_v2 %} requests
{% data reusables.profile.access_org %}

View File

@@ -20,12 +20,8 @@ Organization owners can only view and revoke {% data variables.product.pat_v2 %}
{% ifversion ghec %} Organization owners can also view and revoke {% data variables.product.pat_v1_plural %} if their organization requires SAML single-sign on. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise#viewing-and-revoking-authorized-credentials). For more information about using the REST API to do this, see [List SAML SSO authorizations for an organization](/rest/orgs/orgs#list-saml-sso-authorizations-for-an-organization) and [Remove a SAML SSO authorization for an organization](/rest/orgs/orgs#remove-a-saml-sso-authorization-for-an-organization).{% endif %}
{% ifversion pat-v2-org-admin-api %}
Organization owners can also use the REST API to review and revoke {% data variables.product.pat_v2 %}s. These endpoints can only be called by {% data variables.product.prodname_github_apps %}, and cannot be called with {% data variables.product.pat_generic_plural %} or {% data variables.product.prodname_oauth_apps %}. For more information, see [AUTOTITLE](/rest/orgs/orgs#list-fine-grained-personal-access-tokens-with-access-to-organization-resources).
{% endif %}
## Reviewing and revoking {% data variables.product.pat_v2 %}s
{% data reusables.profile.access_org %}

View File

@@ -36,16 +36,12 @@ On {% data variables.product.prodname_dotcom %}, you can also restore an entire
{% data reusables.package_registry.packages-classic-pat-only %}
{% ifversion packages-rest-api %}
You can use the REST API to manage your packages. For more information, see the [AUTOTITLE](/rest/packages).
{% data reusables.package_registry.delete-with-github-token-using-api-beta %}
With registries that support granular permissions, you can use a `GITHUB_TOKEN` in a {% data variables.product.prodname_actions %} workflow to delete or restore packages using the REST API. The token must have `admin` permission to the package. If your workflow publishes a package, the `admin` role is granted by default to the repository where the workflow is stored. For existing packages not published by a workflow, you need to grant the repository the `admin` role to be able to use a {% data variables.product.prodname_actions %} workflow to delete or restore packages using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#ensuring-workflow-access-to-your-package).
{% endif %}
{% data reusables.package_registry.about-graphql-support %}
## Required permissions to delete or restore a package
@@ -73,7 +69,7 @@ To delete a version of a repository-scoped package, you must have admin permissi
### Deleting a version of a repository-scoped package with GraphQL
{% data reusables.package_registry.about-graphql-support %}{% ifversion packages-rest-api %} For information on using the REST API instead, see the [AUTOTITLE](/rest/packages).{% endif %}
{% data reusables.package_registry.about-graphql-support %} For information on using the REST API instead, see the [AUTOTITLE](/rest/packages).
Use the `deletePackageVersion` mutation in the GraphQL API. You must use a {% data variables.product.pat_v1 %} with the `read:packages`, `delete:packages`, and `repo` scopes. For more information about {% data variables.product.pat_v1_plural %}, see [AUTOTITLE](/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages).

View File

@@ -95,7 +95,7 @@ For more information about Docker and the {% data variables.product.prodname_con
## Managing packages
You can delete a package in the {% data variables.product.product_name %} user interface{% ifversion packages-rest-api %} or using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/deleting-and-restoring-a-package) and the [AUTOTITLE](/rest/packages).{% else %}.{% endif %} {% data reusables.package_registry.about-graphql-support %}
You can delete a package in the {% data variables.product.product_name %} user interface or using the REST API. For more information, see [AUTOTITLE](/packages/learn-github-packages/deleting-and-restoring-a-package) and the [AUTOTITLE](/rest/packages). {% data reusables.package_registry.about-graphql-support %}
When you use the GraphQL API to query and delete private packages, you must use the same {% data variables.product.pat_v1 %} you use to authenticate to {% data variables.product.prodname_registry %}.

View File

@@ -41,12 +41,8 @@ After a Docker image has been migrated to the {% data variables.product.prodname
{% data reusables.package_registry.container-registry-migration-namespaces %}
{% ifversion packages-rest-api %}
After migration, you'll no longer be able to use the GraphQL API to query for packages with a `PackageType` of "DOCKER". Instead, you can use the REST API to query for packages with a `package_type` of "container". For more information, see [AUTOTITLE](/rest/packages).
{% endif %}
{% ifversion fpt or ghec %}
## About billing for {% data variables.product.prodname_container_registry %}

View File

@@ -38,10 +38,8 @@ To use the action in your current workflow place this snippet under `jobs`.
- name: Upload GitHub Pages artifact
{%- ifversion fpt or ghec %}
uses: actions/upload-pages-artifact@v3
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/upload-pages-artifact@v2
{%- else %}
uses: actions/upload-pages-artifact@v1
{%- endif %}
```
@@ -75,10 +73,8 @@ jobs:
id: deployment
{%- ifversion fpt or ghec %}
uses: actions/deploy-pages@v4
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/deploy-pages@v3
{%- else %}
uses: actions/deploy-pages@v1
{%- endif %}
# ...
```
@@ -108,10 +104,8 @@ jobs:
- name: Upload artifact
{%- ifversion fpt or ghec %}
uses: actions/upload-pages-artifact@v3
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/upload-pages-artifact@v2
{%- else %}
uses: actions/upload-pages-artifact@v1
{%- endif %}
# Deployment job
@@ -126,10 +120,8 @@ jobs:
id: deployment
{%- ifversion fpt or ghec %}
uses: actions/deploy-pages@v4
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/deploy-pages@v3
{%- else %}
uses: actions/deploy-pages@v1
{%- endif %}
# ...
```
@@ -154,10 +146,8 @@ jobs:
- name: Upload Artifact
{%- ifversion fpt or ghec %}
uses: actions/upload-pages-artifact@v3
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/upload-pages-artifact@v2
{%- else %}
uses: actions/upload-pages-artifact@v1
{%- endif %}
with:
# upload entire directory
@@ -166,10 +156,8 @@ jobs:
id: deployment
{%- ifversion fpt or ghec %}
uses: actions/deploy-pages@v4
{%- elsif pages-custom-workflow-ghes3-9 %}
{%- elsif ghes %}
uses: actions/deploy-pages@v3
{%- else %}
uses: actions/deploy-pages@v1
{%- endif %}
# ...

View File

@@ -1 +1 @@
1. For each of your accounts, create a dedicated {% data variables.product.pat_v1 %} with `repo` scope. {% ifversion pat-v2 %}Or, for each of your accounts and for each organization that you are a member of, create a {% data variables.product.pat_v2 %} that can access the desired repositories and that has read and write permissions on repository contents.{% endif %} For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
1. For each of your accounts, create a dedicated {% data variables.product.pat_v1 %} with `repo` scope. Or, for each of your accounts and for each organization that you are a member of, create a {% data variables.product.pat_v2 %} that can access the desired repositories and that has read and write permissions on repository contents. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

View File

@@ -1 +1 @@
{% ifversion fpt or ghec %}If you are accessing an organization that uses SAML SSO{% ifversion pat-v2 %} and you are using a {% data variables.product.pat_v1 %}{% endif %}, you must also authorize your {% data variables.product.pat_generic %} to access the organization before you authenticate. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on) and [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).{% endif %}
{% ifversion fpt or ghec %}If you are accessing an organization that uses SAML SSO and you are using a {% data variables.product.pat_v1 %}, you must also authorize your {% data variables.product.pat_generic %} to access the organization before you authenticate. For more information, see [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on) and [AUTOTITLE](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).{% endif %}

View File

@@ -1,6 +1,2 @@
{% ifversion pat-v2 %}
> [!NOTE]
> {% data variables.product.prodname_registry %} only supports authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
{% endif %}

View File

@@ -1,3 +1,3 @@
> [!NOTE]
> * {% ifversion pages-custom-workflow %}If you are publishing from a branch and{% else %}If{% endif %} your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
> * If you are publishing from a branch and your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
> * {% data reusables.actions.actions-do-not-trigger-pages-rebuilds %}

View File

@@ -1,6 +1,6 @@
You can either create a repository or choose an existing repository for your site.
If you want to create a {% data variables.product.prodname_pages %} site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. For example, you can have a dedicated branch and folder to hold your site source {% ifversion pages-custom-workflow %}files, or you can use a custom {% data variables.product.prodname_actions %} workflow to build and deploy your site source files. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}{% else %}files.{% endif %}
If you want to create a {% data variables.product.prodname_pages %} site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. For example, you can have a dedicated branch and folder to hold your site source files, or you can use a custom {% data variables.product.prodname_actions %} workflow to build and deploy your site source files. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}
{% ifversion fpt or ghec %}If the account that owns the repository uses {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_free_team %} for organizations, the repository must be public.{% endif %}

View File

@@ -1,13 +1,5 @@
{% ifversion pages-custom-workflow %}
You can publish your site when changes are pushed to a specific branch, or you can write a {% data variables.product.prodname_actions %} workflow to publish your site. {% data reusables.actions.settings-ui.settings-actions-pages-custom-workflow %}
If you do not need any control over the build process for your site, we recommend that you publish your site when changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
If you want to use a build process other than Jekyll or you do not want a dedicated branch to hold your compiled static files, we recommend that you write a {% data variables.product.prodname_actions %} workflow to publish your site. {% data variables.product.product_name %} provides workflow templates for common publishing scenarios to help you write your workflow.
{% else %}
Your {% data variables.product.prodname_pages %} site will publish whenever changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
{% endif %}

View File

@@ -1 +1 @@
{% ifversion pages-custom-workflow %}If you are publishing from a branch, changes{% else %}Changes{% endif %} to your site are published automatically when the changes are merged into your site's publishing source. {% ifversion pages-custom-workflow %}If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, changes are published whenever your workflow is triggered (typically by a push to the default branch). {% endif %}If you want to preview your changes first, you can make the changes locally instead of on {% data variables.product.product_name %}. Then, test your site locally. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
If you are publishing from a branch, changes to your site are published automatically when the changes are merged into your site's publishing source. If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, changes are published whenever your workflow is triggered (typically by a push to the default branch). If you want to preview your changes first, you can make the changes locally instead of on {% data variables.product.product_name %}. Then, test your site locally. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).

View File

@@ -1,6 +1,2 @@
{% ifversion pat-v2 %}
> [!NOTE]
> The REST API to manage {% data variables.product.prodname_projects_v1 %} only supports authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
{% endif %}

View File

@@ -1,6 +1,2 @@
{% ifversion pat-v2 %}
> [!NOTE]
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
{% endif %}
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic).

View File

@@ -1,6 +1,2 @@
{% ifversion pat-v2 %}
> [!NOTE]
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
{% endif %}

View File

@@ -1,6 +1,2 @@
{% ifversion pat-v2 %}
> [!NOTE]
> These endpoints only support authentication using a {% data variables.product.pat_v1 %}. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
{% endif %}