Skip to main content

此版本的 GitHub Enterprise 将停止服务 2022-02-16. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Using a staging environment

Learn about using GitHub Actions with GitHub Enterprise Server staging environments.

It can be useful to have a staging or testing environment for your GitHub Enterprise Server instance, so that you can test updates or new features before implementing them in your production environment.

A common way to create the staging environment is to use a backup of your production instance and restore it to the staging environment.

When setting up a GitHub Enterprise Server staging environment that has GitHub Actions enabled, you must use a different external storage configuration for GitHub Actions storage than your production environment uses. Otherwise, your staging environment will write to the same external storage as production.

Expect to see 404 errors in your staging environment when trying to view logs or artifacts from existing GitHub Actions workflow runs, because that data will be missing from your staging storage location.

Although it is not required for GitHub Actions to be functional in your staging environment, you can optionally copy the files from the production storage location to the staging storage location.

  • For an Azure storage account, you can use azcopy. For example:

    azcopy copy '' '' --recursive
  • For Amazon S3 buckets, you can use aws s3 sync. For example:

    aws s3 sync s3://SOURCE-BUCKET s3://DESTINATION-BUCKET