Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numtide/github-deploy
Track deployments on GitHub PRs
https://github.com/numtide/github-deploy
buildbot-numtide ci cli github-deployment
Last synced: about 2 months ago
JSON representation
Track deployments on GitHub PRs
- Host: GitHub
- URL: https://github.com/numtide/github-deploy
- Owner: numtide
- Created: 2018-06-03T17:26:40.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T14:52:10.000Z (about 2 months ago)
- Last Synced: 2024-10-28T17:29:24.515Z (about 2 months ago)
- Topics: buildbot-numtide, ci, cli, github-deployment
- Language: Go
- Homepage:
- Size: 6.73 MB
- Stars: 14
- Watchers: 9
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# github-deploy - Track deployments on GitHub
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)
An opinionated command-line utility that integrates deployments with the github Deployment API.
## Description
This is a wrapper command that abstracts the deployment method through a set of scripts which interfaces are clearly defined.
The wrapper command tracks the deployment statuses by interacting with the github API.
## Assumptions
The command is being run in the checkout of the project that is about to be deployed, with the right
git commit checked out.## Usage
`$ ./github-deploy --help`
```
NAME:
github-deploy - A CLI that integrates deployments with githubUSAGE:
github-deploy [global options] command [command options] [arguments...]VERSION:
0.6.1AUTHOR:
zimbatmCOMMANDS:
please Initiates a deployment
cleanup Removes deployments
help, h Shows a list of commands or help for one commandGLOBAL OPTIONS:
--git-commit value git commit ID [$GITHUB_SHA, $BUILDKITE_COMMIT, $CIRCLE_SHA1, $TRAVIS_PULL_REQUEST_SHA]
--git-branch value git branch [$GITHUB_REF, $BUILDKITE_BRANCH, $CIRCLE_BRANCH, $TRAVIS_BRANCH]
--git-origin value URL of the repo [$BUILDKITE_REPO, $CIRCLE_REPOSITORY_URL]
--git-ref-commit use the commit as deployment reference instead of branch
--github-token value Github Personal access token to interact with the Github API (default: ) [$GITHUB_TOKEN]
--help, -h show help
--version, -v print the version
```
## Scripts interface### `DEPLOY_SCRIPT `
The deploy script takes an optional deployment name an argument and returns the target URL on stdout.
Depending on the script exit status, the deployment is marked as a failure or success.
### `LIST_SCRIPT`
Returns the list of all the temporary deployments on stdout.
### `UNDEPLOY_SCRIPT `
Deletes a deployment named ``. Should not undeploy production.
## Install
To install, use `go get`:
```bash
$ go get -d github.com/zimbatm/github-deploy
```## Setup
### Create a token
Go to https://github.com/settings/tokens/new
Select `repo`
export GITHUB_TOKEN=
### Create the wrapper scripts
TODO example
## Contribution
1. Fork ([https://github.com/zimbatm/github-deploy/fork](https://github.com/zimbatm/github-deploy/fork))
1. Create a feature branch
1. Commit your changes
1. Rebase your local changes against the main branch
1. Run test suite with the `go test ./...` command and confirm that it passes
1. Run `gofmt -s`
1. Create a new Pull Request## Author
[zimbatm](https://github.com/zimbatm)
## License
MIT