Github Actions:未找到与指定标签匹配的运行程序:ubuntu-latest

Pie*_*rre 5 github github-actions

我的组织使用“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
Run Code Online (Sandbox Code Playgroud)

Pie*_*rre 4

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

\n

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

\n
\n

“GitHub\nEnterprise Server 目前不支持 GitHub 托管的运行器。您可以在 GitHub 公共路线图上\n查看有关未来计划支持的更多信息。”

\n
\n

GHES 中此功能的路线图位于:\n https://github.com/github/roadmap/issues/72

\n

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

\n
\n

“github-product-roadmap 已将其从 2021 年第 2 季度 \xe2\x80\x93 4 月至 6 月移至 4 月 7 日\nGitHub 公共路线图中的未来”

\n
\n

所以,看来我需要将其运行为:

\n
runs-on: self-hosted\n
Run Code Online (Sandbox Code Playgroud)\n