Skip to content

Commit

Permalink
feat: support custom "working-directory"
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Aug 4, 2023
1 parent d9f3674 commit 842dae1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ inputs:
command:
required: true
description: "Artillery CLI command to execute"
working-directory:
description: "Custom working directory for Artillery commands"

runs:
using: "docker"
image: "Dockerfile"
env:
CWD: ${{ inputs.working-directory }}
args:
- ${{ inputs.command }}

Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh

# Respect custom "working-directory" input.
if [ -z "${CWD}" ]; then
cd "${CWD}"
fi

# Run the tests.
/home/node/artillery/bin/run $1

0 comments on commit 842dae1

Please sign in to comment.