diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index c2343f78..81b2a677 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -26,17 +26,17 @@ jobs: with: distribution: "temurin" java-version: "17" - - name: Move action + - name: Copy action code run: | mkdir ../action - mv * ../action - mv ../action/sample-repo/* . + rsync -a --exclude='sample-repo' . ../action + - run: ls -alh - name: Run action id: run-action uses: ./../action with: target: push - sources: ${{ github.workspace }} + sources: sample-repo code-scanning-path: scanning-report.sarif - name: Check run succeeded env: diff --git a/src/index.ts b/src/index.ts index c42cc747..8526ed2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ const comparisonMarkdownPath = 'comparison.md' async function runAnalysis() { const target = getInput('target') + const sources = getInput('sources') let currBranch = getOptionalEnvVariable('GITHUB_HEAD_REF', '') if (currBranch !== '') { @@ -31,7 +32,16 @@ async function runAnalysis() { const toUpload: string[] = [] // command to print both sarif and lwjson formats - var args = ['scan', '.', '--formats', 'sarif', '--output', sarifReportPath, '--deployment', 'ci'] + var args = [ + 'scan', + sources, + '--formats', + 'sarif', + '--output', + sarifReportPath, + '--deployment', + 'ci', + ] if (target === 'push') { args.push('--save-results') }