Skip to content

Commit

Permalink
Merge branch 'master' of github.com:unfor19/github-secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
unfor19 committed Apr 14, 2020
2 parents 01f83d8 + c74d5e8 commit e1782a0
Showing 1 changed file with 39 additions and 18 deletions.
57 changes: 39 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,67 @@
# githubsecrets

![Release Version](https://img.shields.io/github/v/release/unfor19/githubsecrets) [![Build Status](https://cloud.drone.io/api/badges/unfor19/githubsecrets/status.svg)](https://cloud.drone.io/unfor19/githubsecrets) ![Open Issues](https://img.shields.io/github/issues-raw/unfor19/githubsecrets) ![PyPi Downloads](https://img.shields.io/pypi/dm/githubsecrets) ![License MIT](https://img.shields.io/github/license/unfor19/githubsecrets)
[![Build Status](https://cloud.drone.io/api/badges/unfor19/githubsecrets/status.svg)](https://cloud.drone.io/unfor19/githubsecrets)

A simple CLI to manage GitHub secrets, that are used with [GitHub Actions](https://github.com/features/actions)

![Usage-Example](./assets/github-secrets-usage.gif)

## Requirements

- Python v3.6.7 and above

- POSIX - Linux, macOS or Windows with [Git Bash](https://gitforwindows.org/)

## Installation

### pip

Install with pip on your machine, the package available at [PyPi](https://pypi.org/project/githubsecrets/)
Python v3.6.7 and above

Install with pip on your machine; the package is available at [PyPi](https://pypi.org/project/githubsecrets/)

```bash
$ pip install githubsecrets
```

### Docker

Mount your home directory to `root`, the image available at [DockerHub](https://hub.docker.com/r/unfor19/githubsecrets)
Mount local directory to `root`, the image is available at [DockerHub](https://hub.docker.com/r/unfor19/githubsecrets)

The image runs as a CLI; you must provide arguments, prompts are not available while running in Docker

The image runs as a CLI, you only need to provide the arguments, for example
#### Linux and macOS

Mount your home directory, or any other directory to save the credentials file

```bash
$ docker run -v $HOME:/root unfor19/githubsecrets --help
Usage: ghs [OPTIONS] COMMAND [ARGS]...
...
```

#### Windows

# available commands
$ docker run -v $HOME:/root githubsecrets --help
Mount your Temp directory, or any other directory to save the credentials file. Make sure you use `/` and not `\`

```
$ docker run --rm -v c:/Temp:/root unfor19/githubsecrets --help
Usage: ghs [OPTIONS] COMMAND [ARGS]...
...
```

# create credentials file
$ docker run --rm -v $HOME:/root githubsecrets init
### Build from source

```bash
$ git clone https://github.com/unfor19/githubsecrets.git && cd githubsecrets
...
$ pip install --upgrade pip
...
$ pip install -r requirements.txt
...
$ pip install --editable .
...
# Done!
```

## Getting Started

__Note__: When using Docker, no need to add `ghs`; supply only a command and its arguments

1. Initialize this application - Creates a credential file at `~/.githubsecrets/credentials`

```bash
Expand All @@ -52,9 +73,9 @@ $ docker run --rm -v $HOME:/root githubsecrets init
- repo (all)
- admin:public_key > read:public_key

1. Save the token in a safe place, we'll use it in the next step
1. Save the token in a safe place; we'll use it in the next step
1. Create a profile
1. Create a profile, use the `-p` flag and supply a profile name
```bash
$ ghs profile-apply -p willy_wonka
Expand All @@ -64,7 +85,7 @@ $ docker run --rm -v $HOME:/root githubsecrets init
You'll be prompted to insert:

- Github owner- which is your GitHub Organization or GitHub Account name
- Github owner - which is your GitHub Organization or GitHub Account name (not email address)
- Personal access token - that you've created in the previous steps
1. Create a GitHub secret
Expand All @@ -84,7 +105,7 @@ $ docker run --rm -v $HOME:/root githubsecrets init
- 204 - success
- 404 - secret or repository not found

## Available commands
### Available commands

View all available commands with `ghs --help`

Expand Down

0 comments on commit e1782a0

Please sign in to comment.