-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debug logging to Maven build step
- Loading branch information
Showing
1 changed file
with
41 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,41 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build-and-scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Check out the code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up Java (required for Maven) | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
|
||
# Step 3: Build the project | ||
- name: Build with Maven | ||
run: mvn clean install | ||
|
||
# Step 4: Run source code scan with Semgrep | ||
- name: Run Semgrep | ||
run: | | ||
curl -sSL https://semgrep.dev/install.sh | sh | ||
./semgrep scan --config=auto --json > semgrep-results.json | ||
|
||
# Step 5: Upload scan report as an artifact | ||
- name: Upload Semgrep report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: semgrep-report | ||
path: semgrep-results.json | ||
|
||
|