Skip to content

Commit

Permalink
Merge pull request #19 from simplybusiness/github-app-doc
Browse files Browse the repository at this point in the history
Documentation for github app installation
  • Loading branch information
Punit Jain authored Feb 15, 2021
2 parents afd37ba + 86c34a8 commit f3257fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ Currently it supports bumping version for a gem.
## Bump version

### Installation
Dobby requires a Github App to be installed either on an individual repository or organization wide. If you have already created a Github App you can follow instruction from step 3. Otherwise follow these steps:

Add a file to your github workflow `.github/workflows/dobby-action.yml` with following content:
1. [Create a minimal GitHub App](https://docs.github.com/en/developers/apps/creating-a-github-app), setting the following fields:
- Set GitHub App name.
- Set Homepage URL to your github repository.
- Uncheck Active under Webhook. You do not need to enter a Webhook URL.
- Under Repository permissions: Contents select Access: Read & write.
- Under Repository permissions: Pull requests select Access: Read & write.

2. Create a Private key from the App settings page and store it securely.

3. Install the App either on your repository or organization wide.

4. Set secrets on your repository or organization containing the GitHub App ID, and the private key you created in step 2 as DOBBY_APP_ID, DOBBY_PRIVATE_KEY

5. Add a file to your github workflow `.github/workflows/dobby-action.yml` with following content:

```yaml

Expand All @@ -23,10 +37,11 @@ jobs:
if: startsWith(github.event.comment.body, '/dobby')

steps:
- name: 'bump version'
uses: simplybusiness/dobby@v1.0.0
- name: bump version
uses: simplybusiness/dobby@v2.0.0
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
# Change to the file path where you keep the Gem's version.
# It is usually `lib/<gem name>/version.rb` or in the gemspec file.
VERSION_FILE_PATH: <VERSION FILE PATH>
Expand All @@ -47,4 +62,3 @@ where semver level can be minor/major/patch.
2. You can see bot will add a comment on Pull request.
![Version update comment](docs/images/version-update.png)
Binary file modified docs/images/version-update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f3257fd

Please sign in to comment.