From 18162dc86b794ffd8cb6ae60a5a5fc43f033ad88 Mon Sep 17 00:00:00 2001 From: Tom Riat Date: Sat, 7 Nov 2020 17:39:19 +0100 Subject: [PATCH] feat: try without complete path --- README.md | 2 +- entrypoint.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce3b5be..52bb80a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The action requires the https://github.com/actions/checkout before to download t ## Inputs * `tfsec_actions_comment` - (Optional) Whether or not to comment on GitHub pull requests. Defaults to `true`. -* `tfsec_actions_working_dir` - (Optional) Terraform working directory location. Defaults to `'.'`. +* `tfsec_actions_working_dir` - (Optional) Terraform working directory location. Multiple folders allowed, separated by spaces. Defaults to `'.'`. * `tfsec_exclude` - (Optional) Provide checks via `,` without space to exclude from run. No default * `tfsec_version` - (Optional) Specify the version of tfsec to install. Defaults to the latest diff --git a/entrypoint.sh b/entrypoint.sh index 8cb3ec4..809b3a6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,10 +1,10 @@ #!/bin/bash -# Comment on the pull request if necessary. +# Add specific directory if any if [ "${INPUT_TFSEC_ACTIONS_WORKING_DIR}" != "" ] && [ "${INPUT_TFSEC_ACTIONS_WORKING_DIR}" != "." ]; then - TFSEC_WORKING_DIR="/github/workspace/${INPUT_TFSEC_ACTIONS_WORKING_DIR}" + TFSEC_WORKING_DIR="${INPUT_TFSEC_ACTIONS_WORKING_DIR}" else - TFSEC_WORKING_DIR="/github/workspace/" + TFSEC_WORKING_DIR="." fi # grab tfsec from GitHub (taken from README.md)