如何从/home/runner/xxxxx中访问github操作中的文件

发布于 2025-02-13 15:23:57 字数 670 浏览 0 评论 0原文

我目前正在尝试执行一个操作,将合并文件上传到OneDrive。

我已经设置了一个YML文件,该文件试图首先在组织中克隆另一个私人存储库,然后有助于合并。但是,我最初将数据存储在本地计算机中。因此,它导致行动无法访问该文件。

我所做的:

我尝试在我的回购库中添加数据文件。然后执行动作。但是,

的错误

 for folder in os.listdir(self.dir):
   FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/Orchestra/Orchestra/data'
  • 我的存储库称为乐团,我的数据文件称为数据。我也不知道为什么乐团会出现两次。

  • 我相信这条路径是由OS.listdir(self.dir)调用的,这是我克隆的仓库的一条线。

我现在无法找到的东西:

  • 这条路从哪里来?
  • 我如何使用os.listdir(self.dir)的克隆仓库行访问我本地运行程序时可访问的数据文件?
  • 如果不可能,关于如何访问这些文件的任何建议?

I am currently try to run an action to upload a merged file to onedrive.

I have set up a yml file that try to first clone another private repo in my organisation then which will help perform merging. However, I have store my data in my local machine originally. Hence it lead to action can't access the file.

What I did:

I have try to add the data files in my repo repo. Then perform the action. However the error of

 for folder in os.listdir(self.dir):
   FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/Orchestra/Orchestra/data'
  • My repo is called Orchestra and my data file is called data. Also I have no idea why Orchestra will appears twice.

  • I believe the path is called by os.listdir(self.dir) which is a line from my cloned repo.

What I can't figure out right now:

  • Where does this path come from?
  • How can I use my line of clone repo of os.listdir(self.dir) to access my data file which is accessible when I run the program locally?
  • If it's not possible, any suggestion on how can I access those file ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文