GitHub 工作流:无法下载操作 'https://api.github.com/repos/workflows/checkout/zipball/0'

GitHub Workflow: Failed to download action 'https://api.github.com/repos/workflows/checkout/zipball/0'

我在这里尝试使用 GitHub Actions 为我的 .net 项目编写工作流程,如下所示:

name: CI

on:
  push:
  pull_request:
      branches:
      - '*'
env:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'
jobs:
  ci_build:
    name: Build
    runs-on: windows-latest
    steps:
    - name: NPM Authentication
      uses: workflows/checkout@0
    - name: Use Node.js
      uses: workflows/setup-node@0
    - name: Nuget Command
      uses: workflows/checkout@master
    - uses: nuget/setup-nuget@v1
      with:
        nuget-api-key: ${{ secrets.NuGetAPIKey }}
    - run: nuget restore MyProject.sln
    - name: NuGet Tool Installer
      run: NuGetToolInstaller@0
    - name: NuGet Commad
      run: NuGetCommand@2
      env:
        restoreSolution: '$(solution)'
        selectOrConfig: 'config'
        nugetConfigPath: 'Build/NuGet.config'
    - name: VS Build
      run: VSBuild@1
      env:
        solution: '$(solution)'
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
        msbuildArgs: /p:AuthenticateWithRegistry=false
    - name: VS Test
      run: VSTest@2
      env:
        platform: '$(buildPlatform)'
        configuration: '$(buildConfiguration)'
        testSelector: 'testAssemblies'
        testAssemblyVer2: '**\*test*.dll!**\*IntegrationTests.dll!**\*UiTests.dll!**\*TestAdapter.dll!**\obj\**'
    - name: Copy Files to - $(build.artifactstagingdirectory)
      run: CopyFiles@2
      env:
        content: |
            **\bin\MtPtoject*.zip
            **\bin\**$(buildConfiguration)\*.msi
        targetFolder: $(build.artifactstagingdirectory)
        flattenFolders: true

但在执行过程中,我收到如下错误消息:

  1. Current runner version: '2.163.1'
  2. Prepare workflow directory
  3. Prepare all required actions
  4. Download action repository 'workflows/checkout@0'
  5. [warning]Failed to download action 'https://api.github.com/repos/workflows/checkout/zipball/0'. Error Response status code does not indicate success: 404 (Not Found).
  6. [warning]Back off 29.74 seconds before retry.
  7. [warning]Failed to download action 'https://api.github.com/repos/workflows/checkout/zipball/0'. Error Response status code does not indicate success: 404 (Not Found).
  8. [warning]Back off 29.102 seconds before retry.
  9. [error]Response status code does not indicate success: 404 (Not Found).
  1. 任何指导我在这里做错了什么
  2. 是否有任何工具可以帮助我在不提交 的情况下测试 GitHub 操作?

您指的是不存在的版本中不存在的操作。您已指定 workflows/checkout 修订版 0,但 workflows/checkout 存储库不存在。

您可能想要 actions/checkout,并且您想要指定一个标签,可能 v1,因此这些行看起来像 uses: actions/checkout@v1.

我不知道有任何工具可以处理用于测试 GitHub 操作的新 YAML 语法,尽管有一些工具可以处理较旧的 HCL 语法,这些语法可能已经更新以支持现在的新语法. This repository 可能有合适工具的链接。