Skip to content

Commit

Permalink
Allow specifying a different working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Oct 20, 2020
1 parent d91ccc3 commit 419c21f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down

0 comments on commit 419c21f

Please sign in to comment.