From c29c0c454f3e13dd8ee2d303ee78f302cf4e2776 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 26 Apr 2020 04:22:56 +0300 Subject: [PATCH] add directory arg --- action.yml | 5 +++++ entrypoint.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 7baf9ca..6d3d48d 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,11 @@ inputs: flags: description: 'GolangCI command line flags' required: false + directory: + description: 'Working directory' + required: false + default: '' + runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index ebd75bb..405c3dd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,5 +2,7 @@ echo 'golangci-lint-action: start' +cd "${GITHUB_WORKSPACE}/${DIRECTORY}" || exit 1 + # shellcheck disable=SC2086 golangci-lint run --out-format github-actions ${FLAGS}