Skip to content

Commit 3b017ef

Browse files
authored
Merge pull request #607 from mario-campos/source-root-input
Add a 'source-root' input to the init Action
2 parents 27e3080 + 9932052 commit 3b017ef

12 files changed

+49
-15
lines changed

.github/workflows/pr-checks.yml

+22
Original file line numberDiff line numberDiff line change
@@ -894,3 +894,25 @@ jobs:
894894
- name: Build code
895895
run: ./build.sh
896896
- uses: ./../action/analyze
897+
898+
test-javascript-source-root:
899+
needs: [check-js, check-node-modules]
900+
runs-on: ubuntu-latest
901+
902+
steps:
903+
- uses: actions/checkout@v2
904+
- uses: ./init
905+
with:
906+
languages: javascript
907+
source-root: tests/multi-language-repo
908+
- uses: ./analyze
909+
with:
910+
skip-queries: true
911+
upload: false
912+
- name: Assert database exists
913+
run: |
914+
cd "$RUNNER_TEMP/codeql_databases"
915+
if [[ ! -d javascript ]]; then
916+
echo "Did not find a JavaScript database"
917+
exit 1
918+
fi

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [UNRELEASED]
44

5-
No user facing changes.
5+
- The `init` step of the Action now supports a `source-root` input as a path to the root source-code directory. By default, the path is relative to $GITHUB_WORKSPACE. [#607](https://github.com/github/codeql-action/pull/607)
66

77
## 1.0.5 - 12 Jul 2021
88

init/action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ inputs:
3838
description: Try to auto-install your python dependencies
3939
required: true
4040
default: 'true'
41+
source-root:
42+
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
43+
required: false
4144
outputs:
4245
codeql-path:
4346
description: The path of the CodeQL binary used for analysis

lib/init-action.js

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)