Skip to content

Commit

Permalink
Add 'source-root' input to init action
Browse files Browse the repository at this point in the history
This input is exposed in the CodeQL CLI as the flag --source-root, allowing
users of the CLI to set --source-root different from --working-dir. However,
in codeql-action, these two paths are conflated and it poses problems for
users with complicated build environments, in which a source root may be
a child of the working directory.

Most users should not notice this, as the default value is
${{ github.workspace }}, as it is implied now (`path.resolve()`).
  • Loading branch information
mario-campos authored and aofaof0907 committed Jul 29, 2021
1 parent d7d9e1a commit b68e0b2
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 14 deletions.
4 changes: 4 additions & 0 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ inputs:
description: Try to auto-install your python dependencies
required: true
default: 'true'
source-root:
description: The root source-code directory.
required: true
default: ${{ github.workspace }}
outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
Expand Down
2 changes: 1 addition & 1 deletion lib/init-action.js

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

2 changes: 1 addition & 1 deletion lib/init-action.js.map

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

3 changes: 1 addition & 2 deletions lib/init.js

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

2 changes: 1 addition & 1 deletion lib/init.js.map

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

5 changes: 3 additions & 2 deletions lib/runner.js

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

Loading

0 comments on commit b68e0b2

Please sign in to comment.