diff --git a/README.md b/README.md index 0fafbd1..396ca4f 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 +``` diff --git a/action.yml b/action.yml index bc8956d..c06f3ce 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,16 @@ name: "git-pr-release" description: "Run git-pr-release" author: "bakunyo " +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" diff --git a/entrypoint.sh b/entrypoint.sh index 6d27bea..f9d8235 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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