git - 如何在 GitHub Actions 中使用子模块

标签 git github github-actions

我正在尝试创建一个 CI github 操作,但在访问存储库子模块中的文件时遇到问题:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'directory_in_sub_module/requirements.txt'

现在我的问题是如何通过 github actions 访问位于子模块中的文件?

最佳答案

我只需要通过运行来 checkout 所有子模块:

- name: checkout all the submodules
  uses: actions/checkout@v2
  with:
    submodules: recursive

关于git - 如何在 GitHub Actions 中使用子模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71184834/

相关文章:

github - 使用 SonarQube(社区版)装饰 GitHub 中的拉取请求

Github 操作 : set-output does not seem to work

continuous-integration - 如何使用 Github Action 配置工作服?

git - 与使用 git rm 相比,从工作目录中删除文件并提交

git - 哪个分布式源代码控制系统与 Windows 和 Visual Studio 的集成最好?

javascript - 我无法使用带有 react.js 的 redux 从 github api 获得响应

windows - 来自 Win10 和 Ubuntu WSL 的 Git 提交 - 如何处理文件执行模式更改?

reactjs - 部署到 DigitalOcean 时 GitHub 操作失败

git log 缩写格式长度

git - 结合 git log --stat 和 --name-status?