Coder Social home page Coder Social logo

tj-python / github-deploy Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 185 KB

Python package that automates deployment of files to multiple github repositories at once

License: GNU General Public License v3.0

Python 90.70% Makefile 9.30%
github-config github-deployment auto-sync-config

github-deploy's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.