From 419c21f48a42a1c51d5b297a92623d0a7faa7f02 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Tue, 20 Oct 2020 16:57:30 +0100 Subject: [PATCH] Allow specifying a different working directory --- action.yml | 5 +++++ entrypoint | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/action.yml b/action.yml index 5eada21..03f702b 100644 --- a/action.yml +++ b/action.yml @@ -51,6 +51,10 @@ inputs: description: The domain to gather SSH public keys for (automatic for github.com, gitlab.com, bitbucket.org) required: false + working_dir: + description: Use the given directory as working directory + required: false + outputs: time: description: 'The time the action was run' @@ -69,6 +73,7 @@ runs: action_ssh_key: ${{ inputs.ssh_key }} action_ssh_key_pub: ${{ inputs.ssh_key_pub }} action_ssh_domain: ${{ inputs.ssh_domain }} + action_working_dir: ${{ inputs.working_dir }} branding: icon: 'package' diff --git a/entrypoint b/entrypoint index 49be93a..6e5af11 100755 --- a/entrypoint +++ b/entrypoint @@ -31,6 +31,11 @@ then command_string="$command_string $action_command" fi +if [ -n "$action_working_dir" ] +then + command_string="$command string --working-dir=$action_working_dir" +fi + if [ ! -n "$action_only_args" ] then if [ "$action_command" = "install" ]