diff --git a/.github/workflows/codespaces-prebuild.yml b/.github/workflows/codespaces-prebuild.yml new file mode 100644 index 0000000000..1a31b163ca --- /dev/null +++ b/.github/workflows/codespaces-prebuild.yml @@ -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 }} diff --git a/tests/meta/repository-references.js b/tests/meta/repository-references.js index a1523294ff..dbe5715ec0 100644 --- a/tests/meta/repository-references.js +++ b/tests/meta/repository-references.js @@ -54,6 +54,7 @@ const PUBLIC_REPOS = new Set([ 'insights-releases', 'help-docs-archived-enterprise-versions', 'stack-graphs', + 'codespaces-precache', ]) const ALLOW_DOCS_PATHS = [