-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGuru Reviewer Action with improved error handling (#1010)
- release
- 1.200
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.1
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.1
- 1.41.0
- 1.40.0
- 1.39.1
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.1
- 1.28.0
- 1.27.2
- 1.27.1
- 1.27.0
- 1.26.4
- 1.26.3
- 1.26.2
- 1.26.1
- 1.26.0
- 1.25.2
- 1.25.1
- 1.25.0
- 1.24.0
- 1.23.3
- 1.23.2-alpha
- 1.23.1
- 1.23.0
- 1.22.0
- 1.21.0
- 1.19.0
- 1.18.1
- 1.18.0
- 1.17.0
- 1.16.3
- 1.16.2
- 1.16.1
- 1.16.0
1 parent
0e7b61c
commit 86dd634
Showing
1 changed file
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
# Runs CodeGuru Reviewer on push events, | ||
# and uploads recommendations to the GitHub Security tab. | ||
# For information on the setup see: | ||
# https://github.com/aws-samples/aws-codeguru-reviewer-cicd-cdk-sample | ||
|
||
name: Analyze with CodeGuru Reviewer | ||
on: [push] | ||
permissions: | ||
id-token: write | ||
contents: read | ||
security-events: write | ||
|
||
jobs: | ||
CodeGuruReviewerScan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Assume IAM Role | ||
id: iam-role | ||
continue-on-error: true | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: arn:aws:iam::048169001733:role/GuruGitHubCICDRole | ||
aws-region: us-west-2 | ||
|
||
- uses: actions/checkout@v2 | ||
if: steps.iam-role.outcome == 'success' | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 1.8 | ||
if: steps.iam-role.outcome == 'success' | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Compile | ||
if: steps.iam-role.outcome == 'success' | ||
run: ./gradlew compileJava -x test | ||
- name: Copy build artifacts | ||
if: steps.iam-role.outcome == 'success' | ||
run: | | ||
mkdir -p class-files | ||
cp -r smithy-*/build/classes/java/main/* class-files | ||
- name: Run CodeGuru Reviewer | ||
id: guruscan | ||
if: steps.iam-role.outcome == 'success' | ||
continue-on-error: true | ||
uses: aws-actions/codeguru-reviewer@v1.1 | ||
with: | ||
s3_bucket: codeguru-reviewer-github-profiler-demo-048169001733-uw2 | ||
build_path: ./class-files | ||
|
||
- name: Upload review result | ||
if: steps.iam-role.outcome == 'success' &&steps.guruscan.outcome == 'success' | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: codeguru-results.sarif.json |