如何打印' ls'的输出命令github动作控制台?
我遇到了一个问题,令人惊讶的是,我无法通过github动作从我的存储库中运行脚本。我添加了ls
语句,以查看是否需要更改为其他目录。但是,LS的输出未在GitHub Action Console中打印。
name: Continuous integration pipeline
on: push
jobs:
setup:
name: Run Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: Main
run: |
- ls
- node scripts/setup-npm-version.js
如何修改ls
语句,以便输出将在控制台中打印?
I'm having a problem where surprisingly I am unable to run scripts from my repo in a Github action. I have added an ls
statement to see if I need to change into some other directory. However, the output from ls is not printed in the Github actions console.
name: Continuous integration pipeline
on: push
jobs:
setup:
name: Run Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: Main
run: |
- ls
- node scripts/setup-npm-version.js
How can I modify the ls
statement so that the output will be printed in the console?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
删除破折号:
我实际上建议将两个命令分为两个步骤:
Remove the dashes:
I would actually recommend splitting the two commands into two run steps: