Skip to main content

Deploy yaml files to a large number of repositories in seconds.

Project description

Codacy Badge PyPI version Upload Python Package Downloads

github-deploy

Using polyrepo's to manage projects ?

This can introduce a number challenges one of which is maintaining consistency across multiple repositories, for files like shared configurations without introducing git submodules or mono repositories which requires a more complex deployment configuration.

For example adding a github action or maintaing a consistent pull request template accross your organization.

Solution

github-deploy makes maintaining such configurations as easy as a single command.

Alias : gh-deploy

Installation

pip install github-deploy

Setup

A Personal Access Token which can be created using this guide

Required Scopes

The required scopes are repo and workflow Screen Shot 2022-06-11 at 8 16 01 AM

Usage

Upload files to github

gh-deploy upload --org [org] --token [PAT_TOKEN] --dest [LOCATION TO UPLOAD FILE] --source [SOURCE FILE LOCATION]

Example:

gh-deploy upload --org tj-actions --token [PAT_TOKEN] --dest '.github/workflows/auto-approve.yml' --source auto-approve.yml

NOTE: auto-approve.yml is located on your local system.

Deleting files on github

gh-deploy delete --org [org] --token [PAT_TOKEN] --dest [LOCATION TO DELETE]

Example:

gh-deploy delete --org tj-actions --token [PAT_TOKEN] --dest '.github/auto-approve.yml'

COMMAND

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.

Resources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github-deploy-1.1.2.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

github_deploy-1.1.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file github-deploy-1.1.2.tar.gz.

File metadata

  • Download URL: github-deploy-1.1.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for github-deploy-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6c2dac0b182d1356ffc5b268b1af9811bd816fcbba7b3a402a533fa98bfeee5e
MD5 5200e69b6d915c1785798122b3f8d8e6
BLAKE2b-256 845a8a45f934ce2404da944359f7ec792c6d0bd6c2be10e851e5c18753e0baff

See more details on using hashes here.

File details

Details for the file github_deploy-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for github_deploy-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3d07fec24166e547af4a2d4a4ed552f4b7e3de43e5017789f3156f65564c15
MD5 70dff9d0d2cb9af8354ab51877679cfc
BLAKE2b-256 b91caf5dab3de43ce71de01410605279071c15733030ae221a6c8ea70c6a0438

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page