File tree Expand file tree Collapse file tree 5 files changed +48
-6
lines changed Expand file tree Collapse file tree 5 files changed +48
-6
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ - ' releases/[1-9]+.[0-9]+.x'
7
+ paths-ignore :
8
+ - ' .github/**'
9
+ - ' .gitignore'
10
+ - ' CODE_OF_CONDUCT.md'
11
+ - ' CONTRIBUTING.md'
12
+ - ' INDIVIDUAL_CONTRIBUTOR_LICENSE.md'
13
+ - ' LICENSE'
14
+ - ' NOTICE.txt'
15
+ - ' **/README.md'
16
+ pull_request :
17
+ branches :
18
+ - main
19
+ - ' releases/[1-9]+.[0-9]+.x'
20
+ paths-ignore :
21
+ - ' .github/**'
22
+ - ' .gitignore'
23
+ - ' CODE_OF_CONDUCT.md'
24
+ - ' CONTRIBUTING.md'
25
+ - ' INDIVIDUAL_CONTRIBUTOR_LICENSE.md'
26
+ - ' LICENSE'
27
+ - ' NOTICE.txt'
28
+ - ' **/README.md'
29
+ jobs :
30
+ build :
31
+ runs-on : ubuntu-latest
32
+ steps :
33
+ - uses : actions/checkout@v2
34
+ - name : Sourcehawk Scan
35
+ uses : optum/sourcehawk-scan-github-action@main
36
+ continue-on-error : true
Original file line number Diff line number Diff line change 49
49
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50
50
with :
51
51
tag_name : ${{ format('v{0}', steps.setup.outputs.RELEASE_VERSION) }}
52
- release_name : ${{ format('{0}@v{1}', github.repository_name , github.event.inputs.version) }}
52
+ release_name : ${{ format('{0}@v{1}', github.repository , github.event.inputs.version) }}
53
53
body_path : CHANGELOG.md
54
54
draft : true
55
55
prerelease : false
Original file line number Diff line number Diff line change 1
1
# Small Linux based image with sourcehawk installed
2
2
FROM optumopensource/sourcehawk:0.1.3-alpine
3
3
4
+ # Need root to write
5
+ USER root
6
+
7
+ # Repository gets mounted to this directory
8
+ WORKDIR /github/workspace
9
+
4
10
# Copy Entrypoint script into image and make sure its executable
5
11
COPY entrypoint.sh /entrypoint.sh
12
+ RUN chmod +x /entrypoint.sh
6
13
7
14
# Execute the entrypoint
8
15
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ FAIL_BUILD=${5:-false}
25
25
# Run the scan and output the results
26
26
sourcehawk scan --verbosity MEDIUM --config-file " $CONFIG_FILE " --output-format " $OUTPUT_FORMAT " " $REPOSITORY_ROOT " > " $OUTPUT_FILE "
27
27
28
- # Show the scan results
29
- cat " $OUTPUT_FILE "
30
-
31
28
# Determine if scan passed
32
29
PASSED=false
33
30
if [ $? -eq 0 ]; then
34
31
PASSED=true
35
32
fi
36
33
34
+ # Show the scan results
35
+ cat " $OUTPUT_FILE "
36
+
37
37
# Capture exit code
38
38
echo " ::set-output name=scan-passed::$PASSED "
39
39
Original file line number Diff line number Diff line change 1
- api-version : 0.1
2
1
3
2
config-locations :
4
- - https://github. com/raw/ optum/sourcehawk-parent/master /.sourcehawk/config .yml
3
+ - https://raw.githubusercontent. com/optum/sourcehawk-parent/main /.sourcehawk/optum-oss .yml
You can’t perform that action at this time.
0 commit comments