Skip to content

Feature request: Support this GitHub action run with Windows runner #218

Description

@FrancisChuh

C:/Users/Francis/.cache/act/1a9c745a16f43da1/act/workflow/1-composite-0.sh: line 8: python3: command not found
❌ Failure - Main Install dependencies and run commit-check
exit status 127
❌ Failure - Main

Activity

  1. shenxianpeng commented on Jun 17, 2026

    @shenxianpeng
    Member

    @FrancisChuh can you please share more details how to reproduce?

    right now I have no idea what happened and just see a error python3: command not found

  2. FrancisChuh commented on Jun 18, 2026

    @FrancisChuh
    Author

    Actually I only reuse the sample yml directly on my private gitea server which is a windows server not Linux. And then got the below errors.
    if [[ "$RUNNER_OS" == "Linux" ]]; then

    pypa/setuptools#3269

    export DEB_PYTHON_INSTALL_LAYOUT=deb
    fi

    Set up virtual environment

    python3 -m venv venv
    source venv/bin/activate

    Download artifact

    python3 -m pip download -r "$GITHUB_ACTION_PATH/requirements.txt"

    Verify artifact attestations

    if ! gh attestation verify commit_check-*.whl -R commit-check/commit-check; then
    echo "Artifact verification failed. Aborting installation."
    exit 1
    fi

    Install artifact

    python3 -m pip install commit_check-.whl pygithub-.whl
    python3 "$GITHUB_ACTION_PATH/main.py"
    shell: bash --noprofile --norc -e -o pipefail {0}
    env:
    MESSAGE: true
    BRANCH: true
    AUTHOR_NAME: false
    AUTHOR_EMAIL: false
    DRY_RUN: false
    JOB_SUMMARY: true
    PR_COMMENTS: false
    PR_TITLE: false
    C:/Users/Francis/.cache/act/1a9c745a16f43da1/act/workflow/1-composite-0.sh: line 8: python3: command not found
    ❌ Failure - Main Install dependencies and run commit-check
    exit status 127
    ❌ Failure - Main https://github.com/commit-check/commit-check-action@v2
    exit status 127

  3. shenxianpeng commented on Jun 18, 2026

    @shenxianpeng
    Member

    Actually I only reuse the sample yml directly on my private gitea server which is a windows server not Linux

    For the error: python3: command not found

    So you should use the following command on windows

    python -m venv venv
    venv\Scripts\activate

  4. shenxianpeng commented on Jun 18, 2026

    @shenxianpeng
    Member

    @FrancisChuh if you provide the same error log to the LLM, it should point to the same root cause: the workflow is using Linux-specific commands on a Windows runner.

  5. FrancisChuh commented on Jun 18, 2026

    @FrancisChuh
    Author

    Yeah. I also think that using the Linux -specific cmd on a windows runner. So is there a workaround to run on a windows runner?

  6. shenxianpeng commented on Jun 18, 2026

    @shenxianpeng
    Member

    Please try #218 (comment)

    And I am not sure if GitHub action commit-check/commit-check-action@v2 can work or not on Gitea. Maybe you should use commit-check CLI directly.

  7. FrancisChuh commented on Jun 18, 2026

    @FrancisChuh
    Author
    I fork this and try to add the below but still could not run successfully 
    - name: Install gh CLI and Install dependencies and run commit-check (Windows)
      if: runner.os == 'Windows'
      shell: powershell
      run: |
        # Install GitHub CLI using scoop or choco if available
        if (Get-Command scoop -ErrorAction SilentlyContinue) {
          scoop install gh
        } elseif (Get-Command choco -ErrorAction SilentlyContinue) {
          choco install gh -y
        } else {
          # Download and install gh from GitHub releases
          $version = "2.50.0"
          $url = "https://github.com/cli/cli/releases/download/v$version/gh_${version}_windows_amd64.zip"
          $output = "$env:TEMP\gh.zip"
          
          Write-Host "Downloading GitHub CLI..."
          (New-Object System.Net.WebClient).DownloadFile($url, $output)
          
          Write-Host "Extracting GitHub CLI..."
          Expand-Archive -Path $output -DestinationPath "$env:TEMP" -Force
          
          # Add to PATH
          $ghPath = "$env:TEMP\gh_${version}_windows_amd64\bin"
          $env:PATH = "$ghPath;$env:PATH"
          [Environment]::SetEnvironmentVariable("PATH", "$ghPath;$env:PATH", "Process")
          
          Write-Host "GitHub CLI installed successfully"
        }
    
        # Set up virtual environment
        python -m venv venv
        & ".\venv\Scripts\Activate.ps1"
    
        # 下载 wheels - 使用完整路径
        & "$ghPath\gh.exe" release download v2.8.0 --repo commit-check/commit-check --pattern "commit_check-*.whl"
        & "$ghPath\gh.exe" release download v2.8.0 --repo commit-check/commit-check --pattern "PyGithub-*.whl"
    
        # Verify artifact attestations
        $whlFiles = Get-Item commit_check-*.whl -ErrorAction SilentlyContinue
        if (-not $whlFiles) {
          Write-Error "No commit_check wheel file found"
          exit 1
        }
    
        if ($whlFiles -is [array]) {
          $whlFile = $whlFiles[0]
        } else {
          $whlFile = $whlFiles
        }
    
        & "$ghPath\gh.exe" attestation verify $whlFile.Name -R commit-check/commit-check
        if ($LASTEXITCODE -ne 0) {
          Write-Error "Artifact verification failed. Aborting installation."
          exit 1
        }
    
        # Install artifacts
        python -m pip install commit_check-*.whl PyGithub-*.whl
    
        python "$env:GITHUB_ACTION_PATH\main.py"
      env:
        MESSAGE: ${{ inputs.message }}
        BRANCH: ${{ inputs.branch }}
        AUTHOR_NAME: ${{ inputs.author-name }}
        AUTHOR_EMAIL: ${{ inputs.author-email }}
        DRY_RUN: ${{ inputs.dry-run }}
        JOB_SUMMARY: ${{ inputs.job-summary }}
        PR_COMMENTS: ${{ inputs.pr-comments }}
        PR_TITLE: ${{ inputs.pr-title }}
        GITHUB_TOKEN: ${{ github.token }}
    
  8. shenxianpeng commented on Jun 18, 2026

    @shenxianpeng
    Member

    I finally get your point. You want this GitHub Action to support Windows runners?

  9. changed the title [-][Issue] always fail with host which is a windows server[/-] [+]Feature request: Support this GitHub action run with Windows runner[/+] on Jun 18, 2026
  10. added
    enhancementNew feature or request
    and removed
    invalidThis doesn't seem right
    on Jun 18, 2026
  11. FrancisChuh commented on Jun 18, 2026

    @FrancisChuh
    Author

    Exactly correct. Will you consider to support that?

  12. FrancisChuh commented on Jun 18, 2026

    @FrancisChuh
    Author

    Actually if I am using pip, I will get the below errors.
    ERROR: Could not find a version that satisfies the requirement commit-check==2.8.0 (from -r C:/Users/Francis/.cache/act/aa12e7f60f716ef8/act/actions/16eb55f59cc876f4a7c7abb4dc1ad13c66a753a59298879ad26752f4a6eaa0f9\requirements.txt (line 3)) (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.5, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4)
    ERROR: No matching distribution found for commit-check==2.8.0 (from -r C:/Users/Francis/.cache/act/aa12e7f60f716ef8/act/actions/16eb55f59cc876f4a7c7abb4dc1ad13c66a753a59298879ad26752f4a6eaa0f9\requirements.txt (line 3))
    WARNING: You are using pip version 20.2.1; however, version 25.0.1 is available.
    You should consider upgrading via the 'C:\Users\Francis.cache\act\aa12e7f60f716ef8\hostexecutor\venv\Scripts\python.exe -m pip install --upgrade pip' command.
    Error: failed to open local artifact: open commit_check-*.whl: The filename, directory name, or volume label syntax is incorrect.
    Artifact verification failed. Aborting installation.
    ❌ Failure - Main Install dependencies and run commit-check (Windows)
    exit status 1

  13. shenxianpeng commented on Jun 18, 2026

    @shenxianpeng
    Member

    @FrancisChuh can you try to use the following

    uses: commit-check/commit-check-action@feature/support-windows-runner

    intead of

    uses: commit-check/commit-check-action@v2

    on your gitea server to see if it support Windows runner now?

  14. FrancisChuh commented on Jun 19, 2026

    @FrancisChuh
    Author

    @FrancisChuh can you try to use the following

    uses: commit-check/commit-check-action@feature/support-windows-runner

    intead of

    uses: commit-check/commit-check-action@v2

    on your gitea server to see if it support Windows runner now?

    Met the below errors
    C:/Users/Francis/.cache/act/a4cb1173769856fa/act/workflow/1-composite-0.sh: line 16: python3: command not found
    ❌ Failure - Main Install dependencies and run commit-check
    exit status 127

  15. shenxianpeng commented on Jun 19, 2026

    @shenxianpeng
    Member

    Met the below errors C:/Users/Francis/.cache/act/a4cb1173769856fa/act/workflow/1-composite-0.sh: line 16: python3: command not found ❌ Failure - Main Install dependencies and run commit-check exit status 127

    @FrancisChuh it looks like act or Gitea issue. you can try to add RUNNER_OS: Windows. for example:

     jobs:                                                                                                                                     
        commit-check:                                                                                                                           
          runs-on: windows-latest                                                                                                               
          env:                                                                                                                                  
            RUNNER_OS: Windows   # <-- manual add to let action run into Windows condition.                                                              
          steps:                                                                                                                                
            - uses: actions/checkout@v4                                                                                                         
            - uses: commit-check/commit-check-action@feature/support-windows-runner
    
  16. FrancisChuh commented on Jun 19, 2026

    @FrancisChuh
    Author

    Met the below errors C:/Users/Francis/.cache/act/a4cb1173769856fa/act/workflow/1-composite-0.sh: line 16: python3: command not found ❌ Failure - Main Install dependencies and run commit-check exit status 127

    @FrancisChuh it looks like act or Gitea issue. you can try to add RUNNER_OS: Windows. for example:

     jobs:                                                                                                                                     
        commit-check:                                                                                                                           
          runs-on: windows-latest                                                                                                               
          env:                                                                                                                                  
            RUNNER_OS: Windows   # <-- manual add to let action run into Windows condition.                                                              
          steps:                                                                                                                                
            - uses: actions/checkout@v4                                                                                                         
            - uses: commit-check/commit-check-action@feature/support-windows-runner
    
    Image Still met this error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions