Skip to content
Open
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
Binary file modified .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
Binary file added .github/workflows/.DS_Store
Binary file not shown.
44 changes: 44 additions & 0 deletions .github/workflows/aws-codeguru-reviewer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
branches: [main, mingTest]
pull_request:
branches: [main]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- run: echo "TEST secret ${{ secrets.TEST_SECRET_1 }}"
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # This is a required field for CodeGuru
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: CodeGuru Reviewer
uses: aws-actions/codeguru-reviewer@v1.1
with:
s3_bucket: codeguru-reviewer-ming-bucket # S3 Bucket with "codeguru-reviewer-*" prefix
- name: Upload review result
if: ${{ github.event_name == 'push' }}
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: codeguru-results.sarif.json
- run: |
ls
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ String uploadMultipleFileHandler(@RequestParam("name") String[] names,
// Creating the directory to store file
String rootPath = System.getProperty("catalina.home");
File dir = new File(rootPath + File.separator + "tmpFiles");
if (!dir.exists())
dir.mkdirs();
if (!dir.exists()) {
if (!dir.mkdirs()) {
throw new RuntimeException("Failed to create " +rootPath + File.separator + "tmpFiles dir.");
}
}

// Create the file on server
File serverFile = new File(dir.getAbsolutePath()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ public PDFhighlightDemo() throws IOException {

public static void main(String[] args) throws IOException {

String rootPath = System.getProperty("catalina.home");
File dir = new File(rootPath + File.separator + "tmpFiles");
if (!dir.exists())
dir.mkdirs();
// String rootPath = System.getProperty("catalina.home");
// File dir = new File(rootPath + File.separator + "tmpFiles");
// if (!dir.exists())
// dir.mkdirs();
//

PDDocument document = null;
String fileName = "/Users/mqzhu/apache-tomcat-9.0.69/tmpFiles/saturdayprelimsdeepprogram_032348.pdf";
Expand Down
Binary file not shown.
Binary file not shown.