GitHub Actions 不执行 cmd 上的命令

问题描述 投票:0回答:1

我正在尝试在 Windows 10 运行器上运行 GitHub Actions 来执行一些简单的测试。

我想要运行的操作非常简单:

Name: Test
run-name: ${{ gitea.actor }} is under test
on: [push, pull_request]

jobs:
  Test:
    runs-on: windows
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4
      - name: Build
        shell: cmd.exe
        run: ls

但作为输出,我有正确的作业设置和结帐,并且只有

cmd.exe
的第一个标题行:

Microsoft Windows [Version 10.0.19045.4529]
(c) Microsoft Corporation. All rights reserved.

我尝试过其他简单的命令,但总是得到相同的输出。发生什么事了?

github-actions
1个回答
0
投票

ls
不是 Windows 命令,请使用
dir
代替。

© www.soinside.com 2019 - 2024. All rights reserved.