Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Enabling GitHub Actions with MinIO Gateway for NAS storage

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

Who can use this feature

Site administrators can enable GitHub Actions and configure enterprise settings.

警告:MinIO 已宣布� 除 MinIO 网关。 从 2022 年 6 月 1 日起,当前 MinIO NAS 网关实施的支持和 Bug 修复将仅通过其 LTS 支持合同提供给付费客户。 如果要继续使用 MinIO 网关与 GitHub Actions,我们建议转向 MinIO LTS 支持。 有关详细信息,请参阅计划� 除 minio/minio 存储库中的适用于 GCS、Azure 和 HDFS 的 MinIO 网� �

Prerequisites

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

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

  • Create your bucket for storing workflow data. 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,并有信任的机构签名的证书。 虽然自签名证书可以工作,但自托管的运行器需要额外的配置,不推荐用于生产环境。

  • If you have an HTTP Proxy Server configured on your GitHub Enterprise Server instance:

    • You must add localhost and 127.0.0.1 to the HTTP Proxy Exclusion list.
    • If the BYOS bucket is not routable, then you must also add the bucket's URL to the exclusion list.

    For more information on changing your proxy settings, see "Configuring an outbound web proxy server."

Enabling GitHub Actions with MinIO Gateway for NAS storage

  1. SSH into your GitHub Enterprise Server instance. If your instance comprises multiple nodes, for example if high availability or geo-replication are configured, SSH into the primary node. If you use a cluster, you can SSH into any node. For more information about SSH access, see "Accessing the administrative shell (SSH)."

    $ ssh -p 122 admin@HOSTNAME
  2. 运行 ghe-actions-precheck 命令以测试 Blob 存储配置。 有关详细信息,请参阅“命令行实用工具”。

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

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

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

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

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

  6. 在左侧边� �中,单击“操作”。

    设置侧边� �中的 Actions 选项卡

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

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

  9. Under "Artifact & Log Storage", select Force path style. Checkbox to Force path style

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

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

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

  11. 等待配置运行完毕。

    配置实例

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