Skip to main content

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

Enabling GitHub Actions with Amazon S3 storage

You can enable GitHub Actions on GitHub Enterprise Server and use Amazon S3 storage to store artifacts generated by workflow runs.

Site administrators can enable GitHub Actions and configure enterprise settings.

Prerequisites

警告: 唯一支持的 S3 存储提供商是 Amazon S3 和 MinIO Gateway for NAS。 不支持其他 S3 API 兼容的存储提供商。 有关支持的存储提供商的更多信息,请参阅“GitHub Enterprise Server 的 GitHub Actions 使用入门”。

Before enabling GitHub Actions, make sure you have completed the following steps:

  • Create your Amazon S3 bucket for storing artifacts generated by workflow runs. GitHub Actions 需要以下访问密钥的权限才可访问存储桶:

    • s3:PutObject
    • s3:GetObject
    • s3:ListBucketMultipartUploads
    • s3:ListMultipartUploadParts
    • s3:AbortMultipartUpload
    • s3:DeleteObject
    • s3:ListBucket
    • kms:GenerateDataKey (if Key Management Service (KMS) encryption has been enabled)
  • Review the hardware requirements for GitHub Actions. For more information, see "Getting started with GitHub Actions for GitHub Enterprise Server."

  • TLS must be configured for your GitHub Enterprise Server instance's domain. For more information, see "Configuring TLS."

    Note: 我们强烈建议您在 GitHub Enterprise Server 上配置 TLS,并有信任的机构签名的证书。 虽然自签名证书可以工作,但自托管的运行器需要额外的配置,不推荐用于生产环境。

  • 如果您在 your GitHub Enterprise Server instance上配置了 HTTP 代理服务器 ,则必须添加 localhost127.0.0.1HTTP 代理排除 列表中。 有关更改代理设置的更多信息,请参阅“配置出站 Web 代理服务器”。

Enabling GitHub Actions with Amazon S3 storage

  1. SSH 连接到 your GitHub Enterprise Server instance。 更多信息请参阅“访问管理 shell (SSH)。”

    $ ssh -p 122 admin@HOSTNAME
  2. Run the ghe-actions-precheck command to test your blob storage configuration. 更多信息请参阅“命令行实用程序”。

  3. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

    Screenshot of the rocket ship icon for accessing site admin settings

  4. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

    Screenshot of "Site admin" link

  5. 在左侧边栏中,单击 管理控制台左侧边栏中的 管理控制台 选项卡

  6. 在左侧边栏中,单击 Actions(操作)设置侧边栏中的 Actions 选项卡

  7. 选择 Enable GitHub Actions(启用 GitHub Actions)启用 GitHub Actions 的复选框

  8. Under "Artifact & Log Storage", select Amazon S3, and enter your storage bucket's details:

    • AWS Service URL: The service URL for your bucket. For example, if your S3 bucket was created in the us-west-2 region, this value should be https://s3.us-west-2.amazonaws.com.

      For more information, see "AWS service endpoints" in the AWS documentation.

    • AWS S3 Bucket: The name of your S3 bucket.

    • AWS S3 Access Key and AWS S3 Secret Key: The AWS access key ID and secret key for your bucket. For more information on managing AWS access keys, see the "AWS Identity and Access Management Documentation."

    Radio button for selecting Amazon S3 Storage and fields for S3 configuration

  9. 在左侧边栏下,单击 Save settings(保存设置)管理控制台 中的 Save settings 按钮

  10. 等待配置运行完毕。

Next steps

After the configuration run has successfully completed, GitHub Actions will be enabled on your GitHub Enterprise Server instance. For your next steps, such as managing GitHub Actions access permissions and adding self-hosted runners, return to "Getting started with GitHub Actions for GitHub Enterprise Server."