From 7eff9b4cce8932170e8ec407f15a7319c07b73ff Mon Sep 17 00:00:00 2001 From: Carlos Palhares <chjunior@gmail.com> Date: Thu, 19 May 2022 17:18:02 -0300 Subject: [PATCH] Allow overriding the workdir --- README.md | 2 ++ entrypoint.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 03f68e6..abe2985 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This is a GitHub Action written to streamline the Ruby gem publication process. `RELEASE_COMMAND` - By default, this will invoke `rake release` to build and publish the gem to Rubygems. Set this environment variable if you have a custom release command to be invoked +`WORKDIR` - Sets the workdir where bundle and the release will be run + # Example ```yml diff --git a/entrypoint.sh b/entrypoint.sh index 5de4bbd..9fcc64b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,6 +13,9 @@ EOF chmod 0600 ~/.gem/credentials set -x +work_directory="${WORKDIR:-.}" +cd $work_directory + echo "Installing dependencies..." bundle install > /dev/null