diff --git a/README.md b/README.md index 2861711..63e9252 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,55 @@ +# Dobby + +“Dobby is free.” + +A Github action which provides chat-ops functionality. You can comment on Pull request to perform various operations. +Currently it supports bumping version for a gem. + +## Bump version + +### Installation + +Add a file to your github workflow `.github/workflows/version-update.yml` with following content: + +```yaml + +name: "version update action" +on: + issue_comment: + types: [created] +jobs: + pr_commented: + runs-on: ubuntu-20.04 + if: startsWith(github.event.comment.body, '/dobby') + + steps: + # TODO: remove this step after the action is public + - name: action checkout + uses: actions/checkout@v2 + with: + repository: simplybusiness/dobby + ref: refs/heads/master + token: ${{ secrets.ACCESS_TOKEN }} + path: ./ + - name: 'bump version' + uses: ./ + env: + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Change to the file path where you keep the Gem's version. + # It is usually `lib//version.rb` or in the gemspec file. + VERSION_FILE_PATH: +``` + +### How to use + +1. Add the following comment in the pull request to bump the version. + +``` +/dobby version +``` +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) -Updates the gem version by user input. diff --git a/docs/images/version-update.png b/docs/images/version-update.png new file mode 100644 index 0000000..24dc32c Binary files /dev/null and b/docs/images/version-update.png differ