-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8b3826
commit f140be6
Showing
7 changed files
with
203 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"components": [ | ||
{ | ||
"purl": "pkg:github/zhang14725804/notebook" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as core from '@actions/core' | ||
|
||
export interface ActionParameters { | ||
repoDir: string | ||
outputPath: string | ||
sbomIdentify: string | ||
sbomIgnore: string | ||
apiKey: string | ||
apiUrl: string | ||
} | ||
|
||
export function readInputs(): ActionParameters { | ||
return { | ||
repoDir: process.env.GITHUB_WORKSPACE as string, | ||
outputPath: core.getInput('output-path'), | ||
sbomIdentify: core.getInput('sbom-identify'), | ||
sbomIgnore: core.getInput('sbom-ignore'), | ||
apiKey: core.getInput('api-key'), | ||
apiUrl: core.getInput('api-url') | ||
} | ||
} | ||
|
||
export function commandBuilder(): string { | ||
const ap = readInputs() | ||
console.log(ap) | ||
// prettier-ignore | ||
const command = | ||
`docker run -v "${ap.repoDir}":"/scanoss" ghcr.io/scanoss/scanoss-py:v1.9.0 scan . ` + | ||
`--output ${ap.outputPath} ` + | ||
(ap.sbomIdentify ? `--identify ${ap.sbomIdentify} ` : '') + | ||
(ap.sbomIgnore ? `--ignore ${ap.sbomIgnore} ` : '') + | ||
(ap.apiUrl ? `--apiurl ${ap.apiUrl} ` : '') + | ||
(ap.apiKey ? `--key ${ap.apiKey} ` : '') | ||
|
||
console.log(command) | ||
return command | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div> | ||
<div :class="class1"></div> | ||
<div :class="class2"></div> | ||
<div class="box" :class="class3"></div> | ||
<div class="box" :class="class4"></div> | ||
<div class="box" :class="{ box5: class5 }"></div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.box { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
.box1 { | ||
background-color: #DDD; | ||
} | ||
|
||
.box2 { | ||
background-color: #CCC; | ||
} | ||
|
||
.box3 { | ||
background-color: #BBB; | ||
} | ||
|
||
.box4 { | ||
background-color: #AAA; | ||
} | ||
|
||
.box5 { | ||
background-color: #999; | ||
} | ||
</style> | ||
|
||
<script> | ||
module.exports = { | ||
data () { | ||
return { | ||
class1: ['box', 'box1'], | ||
class2: { | ||
'box': true, | ||
'box1': false, | ||
'box2': true | ||
}, | ||
class3: ['box3'], | ||
class4: { | ||
'box4': true | ||
}, | ||
class5: true | ||
} | ||
} | ||
} | ||
</script> |