几秒钟内部署yaml文件到大量仓库。
项目描述
github-deploy
使用polyrepo管理项目?
这可能会带来一些挑战,其中之一是在多个仓库之间保持一致性,例如在没有引入git子模块或单仓库的情况下共享配置文件,这需要更复杂的部署配置。
例如添加github操作或维护组织内一致的pull request模板。
解决方案
github-deploy
使维护此类配置变得和单个命令一样简单。
别名 : gh-deploy
安装
pip install github-deploy
设置
使用此指南创建个人访问令牌。
必需范围
必需的范围是repo
和workflow
用法
上传文件到github
gh-deploy upload --org [org] --token [PAT_TOKEN] --dest [LOCATION TO UPLOAD FILE] --source [SOURCE FILE LOCATION]
示例
gh-deploy upload --org tj-actions --token [PAT_TOKEN] --dest '.github/workflows/auto-approve.yml' --source auto-approve.yml
注意:
auto-approve.yml
位于您的本地系统。
在github上删除文件
gh-deploy delete --org [org] --token [PAT_TOKEN] --dest [LOCATION TO DELETE]
示例
gh-deploy delete --org tj-actions --token [PAT_TOKEN] --dest '.github/auto-approve.yml'
命令
gh-deploy --help
Usage: gh-deploy [OPTIONS] COMMAND [ARGS]...
Deploy changes to multiple github repositories using a single command.
Options:
--help Show this message and exit.
Commands:
delete Delete a file in all repositories owned by an organization/user.
upload Upload a file to all repositories owned by an organization/user.
gh-deploy upload --help
Usage: gh-deploy upload [OPTIONS]
Upload a file to all repositories owned by an organization/user.
Options:
--org TEXT The github organization.
--token TEXT Personal Access token with read and write
access to org.
--source PATH Source file.
--dest TEXT Destination path.
--overwrite / --no-overwrite Overwrite existing files.
--private / --no-private Upload files to private repositories.
--help Show this message and exit.
gh-deploy delete --help
Usage: gh-deploy delete [OPTIONS]
Delete a file in all repositories owned by an organization/user.
Options:
--org TEXT The github organization.
--token TEXT Personal Access token with read and write access to org.
--dest TEXT Destination path to delete.
--help Show this message and exit.
资源
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
github-deploy-1.2.0.tar.gz (19.0 kB 查看哈希值)
构建分发
github_deploy-1.2.0-py3-none-any.whl (22.1 kB 查看哈希值)