1
0
mirror of synced 2025-12-23 03:44:00 -05:00
Files
docs/content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md
hubwriter 79285d5e92 [23 Feb]: Codespaces prebuilds- [Public Beta] (#25066)
* Draft - add copy from Google doc

* Add images

* More WiP

* test (#25121)

* Update actions-scheduled-workflow-example.md

The editor when changing a CRON time says the most frequent is 5 minutes. Either this section is incorrect or the editor pop over..

* Fix "labels" type

* Add apps permissions for code scanning org endpoint. (#24859)

* cope with possible translation drift (#24842)

* cope with possible translation drift

* fix test

* don't shallow clone

* fix unit tests

* update code comments

* more code comment corrections

* more code comment

* feedbacked

* Add 💅

* Remove yzhang.markdown-all-in-one extension

The markdown-all-in-one extension prevents Alfred expansions happening correctly.

* Revert Add apps permissions for code scanning org endpoint (#25023)

* Add security overview to github-security-features.md

* updating ghcr_token github_token

* archived asset redirects (#25025)

* updating ghec_token to github_token

* set 'manul-purge' surrogate key on assets/cb- URLs (#25028)

* Member privileges edit for forking help doc (#24934)

* calm down Backfill logging (#25031)

* [Feb. 2, 2022] Updates for settings nav redesign (#24604)

* Replace accessibility-tab.png with octicon

* Update and version appearance-tab references

* Replace codespaces-tab.png with octicon

* Replace product name with reusable

* Version reusable using developer-settings.png

* Version reusable using notifcations_menu.png

* Replace org-settings-pages.png with octicon

* Version reusable using repos-tab.png

* Version reusable using saved-replies-tab.png

* Version reusable with settings-applications.png

* Version reusable with settings-sidebar-account-security.png

* version reusable with settings-sidebar-account-settings.png

* Replace settings-sidebar-billing-plans.png with octicon

* Replace settings-sidebar-blocked-users.png with octicon

* Version settings-sidebar-deploy-keys.png

* Version reusable with settings-sidebar-emails.png

* Replace settings-sidebar-interaction-limits.png with octicon

* Replace settings-sidebar-organizations.png with octicon

* Version use of settings-sidebar-repositories.png

* Version reusable with settings-seidebar-security-analysis.png

* Version reusable with settings-sidebar-ssh-keys.png

* Version reusable with settings-sidebar-team-settings.png

* Replace settings-sidebar-third-party-access.png with octicon

* Version reusable with settings-user-orgs.png

* Replace user-settings-pages.png with octicon

* Update pages octicon

* Add explicit versions to elsif tags

* Rewording for consistency

* Improve versioning for future GHAE

* Add missing space

Co-authored-by: Felicity Chapman <felicitymay@github.com>

Co-authored-by: Felicity Chapman <felicitymay@github.com>

* update search indexes

* New translation batch for es (#25035)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=es

* run script/i18n/reset-known-broken-translation-files.js

* Check in es CSV report

* Remove duplicated word (#24974)

* Fix when we show the 'All Enterprise Releases' link (#25002)

* Enterprise versions start with 'enterprise-server'

* Show only if all versions are ghes versions

* Show link if there's any ghes versioning

* Depend on the path for the tool switcher (#25018)

* Azure: use shared env setter, fix comment workflow (#25044)

* update azure deployments to use shared env getter, fix content changes table

* update search indexes

* update search indexes

* Update workflow-syntax-for-github-actions.md

* New translation batch for pt (#25050)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt

* run script/i18n/reset-known-broken-translation-files.js

* update search indexes

* The missing full stop was added.

* update search indexes

* update search indexes

* New translation batch for pt (#25057)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt

* run script/i18n/reset-known-broken-translation-files.js

* New translation batch for es (#25058)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=es

* run script/i18n/reset-known-broken-translation-files.js

* update search indexes

* update search indexes

* Update OpenAPI  Descriptions (#25047)

* update search indexes

* Enterprise bug fixes: week of Jan 31, 2022 (#25043)

* delete the workflow linter (#25075)

* an empty 'product', 'permissions', or 'learningTracks' gets stuck (#25070)

* and empty 'this.product' gets stuck

* add test to prove change

* Update OpenAPI  Descriptions (#25071)

* Update OpenAPI  Descriptions (#25076)

* Update OpenAPI  Descriptions

* Add decorated OpenAPI schema files

Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>

* basic tests of the search API (#25069)

* basic tests of the search API

* lfs

* Revert "Revert Add apps permissions for code scanning org endpoint (#25023)" (#25026)

* update website-scraper to update transitive nth-check dep (#25080)

* update search indexes

* New translation batch for es (#25088)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=es

* run script/i18n/reset-known-broken-translation-files.js

* Update code-scanning-alert.png (#25072)

* use manual surrogate key for nextjs static assets (#25096)

* use manual surrogate key for nextjs static assets

* refactor

* update search indexes

* Update differences-between-clustering-and-high-availability-ha.md (#25107)

* Update OpenAPI  Descriptions (#25104)

* Add versioning for GHAE 3.3 (#24936)

* Update content/code-security/getting-started/github-security-features.md

* update search indexes

* [Actions] `push` event does not have Activity types (#15124)

* 📝 Clarify usage of single quotes in string datatype for literals (#14895)

* Fix value of GITHUB_REF for release events (#14876)

* New translation batch for pt (#25084)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=pt

* run script/i18n/reset-known-broken-translation-files.js

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>

* New translation batch for ja (#25093)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check parsing

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=ja

* run script/i18n/reset-known-broken-translation-files.js

* Check in ja CSV report

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>

* New translation batch for cn (#25090)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn

* run script/i18n/reset-known-broken-translation-files.js

* Check in cn CSV report

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>

* Create github-debian.sh

* Update Dockerfile

* Update procedures for personal account recovery with two-factor authentication (#25040)

* delete old deploy.js script (#24862)

Co-authored-by: Mark Battistella <markbattistella@users.noreply.github.com>
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
Co-authored-by: Anders Starcke Henriksen <starcke@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: lucie-docs <40564413+lucie-docs@users.noreply.github.com>
Co-authored-by: Josh Johanning <joshjohanning@github.com>
Co-authored-by: Tahlia G <84726379+tahlialouisa@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: GitHub Actions <action@github.com>
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Simon Giesemann <kwacky1@github.com>
Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Albin PK <56157868+albinpk@users.noreply.github.com>
Co-authored-by: Dasun Tharanga <dasuntharangaflash@gmail.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
Co-authored-by: Ramya Parimi <33761166+ramyaparimi@users.noreply.github.com>
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Dorothy Mitchell <dorothymitchell@github.com>
Co-authored-by: Andy J <mumfy@github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Marko Kaznovac <kaznovac@users.noreply.github.com>
Co-authored-by: Anil Seervi <61609033+AnilSeervi@users.noreply.github.com>
Co-authored-by: Johanan Idicula <johanan@forcepush.tech>

* Add more screenshots

* complete items on plan

* Revert changes to files I didn't change

* Minor tweaks

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Remove detail about building prebuilds by rerunning a workflow

After deleting a prebuild configuration anyone who can access the workflow history can recreate the prebuilds by rerunning the previous workflow run - unless you go through manually deleting all of those entries from the workflow history. Removed this information as per review comment.

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/customizing-your-codespace/prebuilding-codespaces-for-your-project.md

* Update data/reusables/codespaces/billing-for-prebuilds.md

* Update data/reusables/codespaces/billing-for-prebuilds.md

* Restructure info into separate articles

* Update content/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Move prerequisites section

* Move billing info

* Update content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Update data/reusables/codespaces/billing-for-prebuilds.md

* Update data/reusables/codespaces/billing-for-prebuilds.md

Co-authored-by: Laura Coursen <lecoursen@github.com>

* Move deletion points, as per review comment

* Update link

* Add links to new information

* Make review comment changes

* Update content/codespaces/prebuilding-your-codespaces/managing-prebuilds.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Update content/codespaces/prebuilding-your-codespaces/testing-dev-container-changes.md

* Update content/codespaces/prebuilding-your-codespaces/testing-dev-container-changes.md

Co-authored-by: Jackie Jiménez <jaclynj@github.com>

* Optimize images

Co-authored-by: Mark Battistella <markbattistella@users.noreply.github.com>
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
Co-authored-by: Anders Starcke Henriksen <starcke@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
Co-authored-by: Laura Coursen <lecoursen@github.com>
Co-authored-by: lucie-docs <40564413+lucie-docs@users.noreply.github.com>
Co-authored-by: Josh Johanning <joshjohanning@github.com>
Co-authored-by: Tahlia G <84726379+tahlialouisa@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
Co-authored-by: Felicity Chapman <felicitymay@github.com>
Co-authored-by: GitHub Actions <action@github.com>
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Simon Giesemann <kwacky1@github.com>
Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Albin PK <56157868+albinpk@users.noreply.github.com>
Co-authored-by: Dasun Tharanga <dasuntharangaflash@gmail.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
Co-authored-by: Ramya Parimi <33761166+ramyaparimi@users.noreply.github.com>
Co-authored-by: github-openapi-bot <github-openapi-bot@users.noreply.github.com>
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Dorothy Mitchell <dorothymitchell@github.com>
Co-authored-by: Andy J <mumfy@github.com>
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Marko Kaznovac <kaznovac@users.noreply.github.com>
Co-authored-by: Anil Seervi <61609033+AnilSeervi@users.noreply.github.com>
Co-authored-by: Johanan Idicula <johanan@forcepush.tech>
Co-authored-by: Jackie Jiménez <jaclynj@github.com>
Co-authored-by: github-actions <github-actions@github.com>
2022-02-23 17:52:53 +00:00

8.2 KiB

title, shortTitle, intro, versions, type, topics, product, miniTocMaxHeadingLevel
title shortTitle intro versions type topics product miniTocMaxHeadingLevel
Managing prebuilds Manage prebuilds You can review, modify, and delete the prebuild configurations for your repository.
fpt ghec
* *
how_to
Codespaces
{% data reusables.gated-features.codespaces %} 3

{% data reusables.codespaces.prebuilds-beta-note %}

Checking, changing, and deleting your prebuild configurations

The prebuilds that you configure are created and updated using a {% data variables.product.prodname_actions %} workflow, managed by the {% data variables.product.prodname_codespaces %} service.

The workflow is triggered by these events:

  • Creating or updating the prebuild configuration
  • Pushing a commit or a pull request to a branch that's configured to have prebuilds
  • Manually triggering the workflow

People with admin access to a repository can check the progress of prebuilds, edit, and delete prebuild configurations.

Viewing the progress of prebuilds

You can view the current status of the latest workflow run for each prebuild configuration you've set up on the {% data variables.product.prodname_codespaces %} page of your repository settings. For example, "Currently running" or "Last run 1 hour ago."

To see the log output for the latest prebuild workflow run, click See output.

The 'See output' button

This displays the output of the most recent run of the workflow in the Actions tab.

The prebuild workflow output

Alternatively, to view all prebuild workflow runs associated with the specified branch, click the ellipsis button and choose View runs from the dropdown menu.

The 'View runs' option in the drop-down menu

This displays the workflow run history for prebuilds for the associated branch.

The workflow run history

Editing a prebuild configuration

  1. On the {% data variables.product.prodname_codespaces %} page of your repository settings, click the ellipsis to the right of the prebuild configuration you want to edit.

  2. In the dropdown menu, click Edit.

    The 'Edit' option in the drop-down menu

  3. Make the required changes to the prebuild configuration, then click Update.

Delete a prebuild configuration

Deleting a prebuild configuration also deletes all previously created prebuild templates for that configuration. As a result, shortly after you delete a configuration, prebuilds generated by that configuration will no longer be available when you create a new codespace.

After you delete a prebuild configuration, workflow runs for that configuration that have been queued or started will still run. They will be listed in the workflow run history, along with previously completed workflow runs.

  1. On the {% data variables.product.prodname_codespaces %} page of your repository settings, click the ellipsis to the right of the prebuild configuration you want to delete.

  2. In the dropdown menu, click Delete.

    The 'Delete' option in the drop-down menu

  3. Click OK to confirm the deletion.

Manually trigger prebuilds

It may be useful to manually trigger a workflow run for a prebuild configuration. Generally this is only necessary if you are debugging a problem with the workflow for a prebuild configuration.

  1. On the {% data variables.product.prodname_codespaces %} page of your repository settings, click the ellipsis to the right of the prebuild configuration whose workflow you want to trigger.

  2. In the dropdown menu, click Manually trigger.

    The 'Manually trigger' option in the drop-down menu

Allowing a prebuild to access external resources

By default, the {% data variables.product.prodname_actions %} workflow for a prebuild configuration can only access its own repository contents. Your project may use additional resources to build the development environment, such as files in other repositories, packages, GHCR images, and APIs. To allow your prebuild setup to access these resources, you will need to create a new personal account and then use this account to create a personal access token (PAT) with the appropriate scopes.

  1. Create a new personal account on {% data variables.product.prodname_dotcom %}.

    {% warning %}

    Warning: Although you can generate the PAT using your existing personal account, we strongly recommend creating a new account with access only to the target repositories required for your scenario. This is because the access token's repository permission grants access to all of the repositories that the account has access to. For more information, see "Signing up for a new GitHub account" and "Security hardening for {% data variables.product.prodname_actions %}."

    {% endwarning %}

  2. Give the new account read access to the required repositories. For more information, see "Managing an individual's access to an organization repository."

  3. While signed into the new account, create a PAT with the repo scope. Optionally, if the prebuild will need to download packages from the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %}, also select the read:packages scope. For more information, see "Creating a personal access token."

    'repo' and 'packages' scopes selected for a PAT

    If the prebuild will use a package from the {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %}, you will need to either grant the new account access to the package or configure the package to inherit the access permissions of the repository you are prebuilding. For more information, see "Configuring a package's access control and visibility."
    {% ifversion ghec %}1. Authorize the token for use with SAML single sign-on (SSO), so that it can access repositories that are owned by organizations with SSO enabled. For more information, see "Authorizing a personal access token for use with SAML single sign-on."

    The button to configure SSO for a PAT

{% endif %}

  1. Copy the token string. You will assign this to a {% data variables.product.prodname_codespaces %} repository secret.
  2. Sign back into the account that has admin access to the repository.
  3. In the repository for which you want to create {% data variables.product.prodname_codespaces %} prebuilds, create a new {% data variables.product.prodname_codespaces %} repository secret called CODESPACES_PREBUILD_TOKEN, giving it the value of the token you created and copied. For more information, see "Managing encrypted secrets for your repository and organization for {% data variables.product.prodname_codespaces %}."

The PAT will be used for all subsequent prebuild templates created for your repository. Unlike other {% data variables.product.prodname_codespaces %} repository secrets, the CODESPACES_PREBUILD_TOKEN secret is only used for prebuilding and will not be available to use in codespaces created from your repository.

Further reading