【问题标题】:Github Actions: No runner matching the specified labels was found: ubuntu-latestGithub Actions:找不到匹配指定标签的运行器:ubuntu-latest
【发布时间】:2021-05-20 20:28:31
【问题描述】:

我的组织使用“GitHub Enterprise Server 3.0.1”(以防有任何影响)。

我在我的项目中创建了一个 .github/workflows/scala.yml 文件。 Github Action 可以正常触发,但会因以下错误而死:

“未找到匹配指定标签的运行器:ubuntu-latest。”

我尝试将其更改为 ubuntu-20.04,现在我得到:

“未找到匹配指定标签的运行器:ubuntu-20.04。”

相同的结果,无论我是手动触发操作还是签入/推送更改到我的开发分支:操作触发但因上述错误而失败(我收到一封来自 GitHub 的电子邮件,告诉我我的构建作业失败的)。我感觉这可能是 YAML 解析问题。我确认在“ubuntu-latest”字符串/行之后没有空格或奇怪/不可见的字符(我在我的十六进制编辑器中检查了)。有什么想法吗?

这是我的 scala.yml:

name: Scala CI

on:
  workflow_dispatch:
  push:
    branches:
    - Development
  pull_request:
    branches:
    - Development

jobs:
  build-job:
    runs-on: ubuntu-20.04

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Run tests
      run: sbt test

【问题讨论】:

    标签: github github-actions


    【解决方案1】:

    此页面包含答案:Github Enterprise (GHES) 不支持 GitHub 托管的运行器...

    https://docs.github.com/en/enterprise-server@3.0/admin/github-actions

    "GitHub 托管的运行器目前在 GitHub 上不受支持 企业服务器。您可以查看有关计划未来的更多信息 对 GitHub 公共路线图的支持。”

    GHES 中此功能的路线图如下: https://github.com/github/roadmap/issues/72

    在路线图上,此功能已从“2021 年第二季度”移至“未来”:

    "github-product-roadmap 将此从 Q2 2021 – Apr-Jun 移至 Future in GitHub 4 月 7 日公开路线图”

    所以,看来我需要这样运行:

    runs-on: self-hosted
    

    【讨论】:

      猜你喜欢
      • 2021-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-14
      • 2023-01-27
      • 2021-09-16
      • 2022-11-11
      相关资源
      最近更新 更多