Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ inputs:
description: 'directory with infrastructure code to scan'
default: '.'
required: false
working-directory:
description: 'action working directory (should be root of repository so that git blame works properly)'
default: '.'
required: false
tag_groups:
description: 'Run scan on all checks but a specific check identifier (comma separated)'
required: false
Expand Down Expand Up @@ -57,4 +61,4 @@ branding:

runs:
using: 'node16'
main: 'dist/index.js'
main: 'dist/index.js'
2 changes: 2 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async function run(): Promise<void> {
getArgs('--tag-prefix', 'tag_prefix'),
getArgs('--tag-local-modules', 'tag_local_modules')
].flat()
const workingDirectory = core.getInput('working-directory')

// Downloading Yor
const yorExactVersion =
Expand All @@ -48,6 +49,7 @@ async function run(): Promise<void> {
// Executing Yor
const pathToYor = path.join(pathToCLI, 'yor')
await exec.exec(pathToYor, ['-v'])
await exec.exec('cd ' + workingDirectory)
const exitCode = await exec.exec(pathToYor, yorArgs)

if (exitCode > 0) {
Expand Down