1
0
mirror of synced 2026-01-08 03:01:54 -05:00

Adding Codespace prebuilds to docs-internal (#23952)

* Adding Codespaces prebuilds
* Adding permissions
* Use pinned SHA for github/codespaces-precache action
* Add comments
* Add codespaces-precache repo to reference allow list

Co-authored-by: James M. Greene <jamesmgreene@github.com>
This commit is contained in:
Mike McDonald
2022-01-10 23:23:08 -07:00
committed by GitHub
parent bb58be2d50
commit 04da545821
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
name: Prebuild Codespaces
# **What it does**: Prebuild the Codespaces image using powerful machines.
# See https://github.com/github/codespaces-precache#readme for more details.
# IMPORTANT: Requires we set a `EXPERIMENTAL_CODESPACE_CACHE_TOKEN` Codespaces
# Secret (NOT an Actions Secret) in the repository.
# **Why we have it**: Reduces startup time when booting Codespaces.
# **Who does it impact**: Any Docs contributors who want to use Codespaces.
on:
push:
branches:
- main
workflow_dispatch:
# Currently requires write, but in the future will only require read
permissions:
contents: write
jobs:
createPrebuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- uses: github/codespaces-precache@2ad40630d7e3e45e8725d6a74656cb6dd17363dc
with:
regions: WestUs2 EastUs WestEurope SouthEastAsia
sku_name: basicLinux32gb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}