github动作错误,因为它可以查看文件夹
我正在尝试设置我的第一个gihub动作。它需要做的就是对我的Godot文件进行测试。我基于模板。
name: CI
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: godot-tester
uses: croconut/[email protected]
with:
version: 3.4
release_type: stable
# Give relative path to your project.godot, if not in top level of repo
path: app
操作每次试图找到项目文件时都会出错。
/entrypoint.sh: line 166: cd: ./app: No such file or directory
文件夹在那里,它包含项目。我尝试过有或没有拖延的斜线,这没有什么区别。
I'm trying to set up my first GiHub Action. All it needs to do is run a test over my Godot files. I based it on a template.
name: CI
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: godot-tester
uses: croconut/[email protected]
with:
version: 3.4
release_type: stable
# Give relative path to your project.godot, if not in top level of repo
path: app
The action errors every time, when trying to find the project file.
/entrypoint.sh: line 166: cd: ./app: No such file or directory
The folder, app, is there and it contains the project. I've tried with or without a trailing slash, it makes no difference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您需要从github操作工作流中的适当存储库中访问文件时,需要设置 actions/checkut < /a>首先。
这将允许工作流访问 github工作区(基本上是存储库根)。
在您的情况下,工作流程应该看起来像这样:
Action/Checkout
操作具有默认行为,但是您还可以配置其他字段以自定义您想要的操作。检查 Action Readme Page 查看所有可能性。When you need to access the files from the proper repository in a Github Actions workflow, you need to setup the actions/checkout first.
This will allow the workflow to access the Github workspace (which is basically the repository root).
In your case, the workflow should look like this:
The
actions/checkout
action has a default behavior, but you can also configure other fields to customize what you want it to do. Check the action README page to see all the possibilities.