Skip to content
Draft
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
8 changes: 4 additions & 4 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 11 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 !== '') {
Expand All @@ -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')
}
Expand Down
Loading