Skip to content

Commit

Permalink
Merge pull request #14 from ponkio-o/add_custom_args_option
Browse files Browse the repository at this point in the history
Support custom arguments
  • Loading branch information
bakunyo authored May 9, 2022
2 parents b496deb + e65c9d2 commit 035b715
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GitHub Action to run [git-pr-release](https://github.com/motemen/git-pr-release)

For example, here is a workflow to run `git-pr-release` when push to staging.

```
```yaml
name: Create PR from staging to master
on:
push:
Expand Down Expand Up @@ -37,3 +37,15 @@ Add [GITHUB_TOKEN secret](https://help.github.com/en/articles/virtual-environmen
#### Other optional environment variables

Any environment variables defined by [git-pr-release](https://github.com/motemen/git-pr-release) also can use on this action (`GIT_PR_RELEASE_BRANCH_PRODUCTION`, `GIT_PR_RELEASE_BRANCH_STAGING` etc).

### Custom arguments
`git-pr-release` command supports some arguments. These can be specified by using `args` input.

```yaml
- name: git-pr-release
uses: bakunyo/git-pr-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: '--squashed' # If you are using squash merge
```
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: "git-pr-release"
description: "Run git-pr-release"
author: "bakunyo <izuta.hiroyuki@gmail.com>"
inputs:
args:
description: "Specify the arguments to the git-pr-release command"
required: false
default: ''
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.args }}
branding:
icon: "check-square"
color: "green"
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -eu
export GIT_PR_RELEASE_TOKEN=$GITHUB_TOKEN
git config --global --add safe.directory $(pwd)
git-pr-release
git-pr-release $1

0 comments on commit 035b715

Please # to comment.