Search code examples
gitgithubgithub-for-windowsgithub-actions

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


I'm here trying to write a workflow using GitHub Actions for my .net project, which is as below:

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

But in it's execution, I'm receiving an error as mentioned below:

  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. Any guidance that what I have done wrong here ?
  2. Is there any tool that can help me to test GitHub actions without commit ?

Solution

  • You're referring to an action that doesn't exist in a version that doesn't exist. You've specified workflows/checkout with revision 0, but no workflows/checkout repository exists.

    You probably wanted actions/checkout, and you'd want to specify a tag, probably v1, so those lines would look like uses: actions/checkout@v1.

    I'm not aware of any tools that handle the new YAML syntax for testing GitHub Actions, although there were some that handled the older HCL syntax that may have been updated to support the new syntax by now. This repository may have links to suitable tools.