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.

谁可以使用此功能?

Site administrators can enable GitHub Actions and configure enterprise settings.

关于 GitHub Actions

的外部存储

GitHub Actions 使用外部 blob 存储来存储工作流运行生成的数据。 存储的数据包括工作流日志缓存和用户上传的生成项目。有关详细信息,请参阅“Getting started with GitHub Actions for GitHub Enterprise Server”。

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 你的 GitHub Enterprise Server 实例.

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

    • s3:PutObject
    • s3:GetObject
    • s3:ListBucketMultipartUploads
    • s3:ListMultipartUploadParts
    • s3:AbortMultipartUpload
    • s3:DeleteObject
    • s3:ListBucket
    • kms:GenerateDataKey(如果已启用密钥管理服务 (KMS) 加密)
  • 查看 GitHub Actions 的硬件要求。 有关详细信息,请参阅“Getting started with GitHub Actions for GitHub Enterprise Server”。

  • 必须为 你的 GitHub Enterprise Server 实例 的域配置 TLS。 有关详细信息,请参阅“Configuring TLS”。

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

  • 如果在 你的 GitHub Enterprise Server 实例 上配置了 HTTP 代理服务器:

  • 必须将 .localhost127.0.0.1::1 添加到“HTTP 代理排除”**** 列表(以此顺序)。

  • 如果外部存储位置不可路由,则还必须将外部存储 URL 添加到排除列表中。

有关更改代理设置的详细信息,请参阅“Configuring an outbound web proxy server”。

Enabling GitHub Actions with MinIO storage

  1. 在 GitHub Enterprise Server 上的管理帐户中,在任一页面的右上角,单击

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

  3. 在“ 站点管理”边栏中,单击“管理控制台”。

  4. 在“设置”边栏中,单击“操作”。

  5. 在“GitHub Actions”下,选择“启用 GitHub Actions”。

  6. 在“项目和日志存储”下的“Amazon S3”旁,单击“设置”。

  7. Under "Authentication", select Credentials-based, and enter your storage bucket's details:

    Note: For MinIO, you cannot use OpenID Connect (OIDC) authentication. You must use credentials-based authentication.

    • AWS 服务 URL:MinIO 服务的 URL。 例如 https://my-minio.example:9000
    • AWS S3 存储桶:S3 存储桶的名称。
    • AWS S3 访问密钥和 AWS S3 密钥:用于 MinIO 实例的 MINIO_ACCESS_KEYMINIO_SECRET_KEY
  8. Under "Artifact & Log Storage", select Force path style.

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

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

  10. 在“设置”边栏下,单击“保存设置”。

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

  11. 等待配置运行完毕。

后续步骤

配置运行成功完成后,GitHub Actions 将在 你的 GitHub Enterprise Server 实例 上启用。 对于后续步骤,例如管理 GitHub Actions 访问权限和添加自托管运行器,请返回到“Getting started with GitHub Actions for GitHub Enterprise Server”。