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}