在 GitHub 上,我使用名为
private-workflows
的私有存储库来存储可重用工作流程和复合操作。
在另一个私有存储库中,例如名为
project-repo
,我在 GitHub 操作中使用这些工作流程和操作。
project-repo
中的dependabot配置为检查GitHub操作上的更新。
Dependabot 然后失败并显示以下错误消息:
Dependabot 未能更新您的依赖项
以下 git 存储库无法访问并导致更新失败:actions。
个人用户帐户不支持更新引用私有 git 存储库的依赖文件。要将 Dependabot 与引用私有 git 存储库的依赖项文件一起使用,您可以使用 git 注册表,也可以使用组织帐户并授予 Dependabot 对私有存储库的访问权限。
我没有组织帐户。
在这种情况下,我到底该如何配置 dependentabot 才能工作?错误消息中提供的有关“私有 git 注册表”的文档不是很详细。
除了按照写的添加注册表外,还需要在更新部分引用:
version: 2
registries:
github-octocat:
type: git
url: https://github.com
username: x-access-token
password: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
updates:
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
registries:
- github-octocat
schedule:
interval: "daily"