From 0e924f2acf1d18e79b0118cb5500300785f3e4a8 Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Tue, 1 Mar 2022 21:03:00 +0900 Subject: [PATCH 1/2] ADD: args option --- action.yml | 7 +++++++ entrypoint.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 3f8dcd7..20eb858 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,4 @@ set -eu export GIT_PR_RELEASE_TOKEN=$GITHUB_TOKEN -git-pr-release +git-pr-release $1 From 24a8af3d08330189328ec7b3909ba983b9fb0eca Mon Sep 17 00:00:00 2001 From: ponkio-o <29038315+ponkio-o@users.noreply.github.com> Date: Tue, 1 Mar 2022 21:54:28 +0900 Subject: [PATCH 2/2] UPDATE: Add custom arguments --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 +```