Skip to main content

Enabling GitHub Actions with MinIO storage

You can enable GitHub Actions on GitHub Enterprise Server and use MinIO storage to store data generated by workflow runs.

Who can use this feature

Site administrators can enable GitHub Actions and configure enterprise settings.

Prerequisites

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

  • Create your MinIO bucket for storing data generated by workflow runs. For more information about installing and configuring MinIO, see "MinIO High Performance Object Storage" and "mc mb" in the MinIO documentation.

    To avoid resource contention on the appliance, we recommend that MinIO be hosted separately from your GitHub Enterprise Server instance.

    GitHub Actions 需要以下访问密钥的权限才可访问存储桶:

    • s3:PutObject
    • s3:GetObject
    • s3:ListBucketMultipartUploads
    • s3:ListMultipartUploadParts
    • s3:AbortMultipartUpload
    • s3:DeleteObject
    • s3:ListBucket
    • kms:GenerateDataKey(如果已启用密钥管理服务 (KMS) 加密)
  • 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.1 添加到“HTTP 代理排除”列表。
    • 如果外部存储位置不可路由,则还必须将外部存储 URL 添加到排除列表中。

    有关更改代理设置的详细信息,请参阅“配置出站 Web 代理服务器”。

Enabling GitHub Actions with MinIO storage

  1. 从 GitHub Enterprise Server 上的管理帐户任意页面的右上角,单击

    用于访问站点管理员设置的火箭图标的屏幕截图

  2. 如果你尚未在“站点管理员”页上,请在左上角单击“站点管理员”。

    “站点管理员”链接的屏幕截图

  3. 在左侧边栏中,单击“管理控制台”。 左侧边栏中的 管理控制台 选项卡

  4. 在左侧边栏中,单击“操作”。

    设置侧边栏中的 Actions 选项卡

  5. 选择“启用 GitHub Actions”。 “启用 GitHub Actions”复选框

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

    • AWS Service URL: The URL to your MinIO service. For example, https://my-minio.example:9000.
    • AWS S3 Bucket: The name of your S3 bucket.
    • AWS S3 Access Key and AWS S3 Secret Key: The MINIO_ACCESS_KEY and MINIO_SECRET_KEY used for your MinIO instance.

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

  7. Under "Artifact & Log Storage", select Force path style.

    Checkbox to Force path style

  8. 单击“测试存储设置”按钮验证存储设置。

    如果在验证存储设置时出现任何错误,请检查存储提供程序设置并重试。

  9. 在左侧边栏下,单击“保存设置”。

    管理控制台 中的“保存设置”按钮的屏幕截图

    注意:保存 管理控制台 中的设置会重启系统服务,这可能会导致用户可察觉的停机时间。

  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."