Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial GitHub Actions CI workflow #1168

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
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'
distribution: 'temurin'

# 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: |
pip install semgrep
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

41 changes: 41 additions & 0 deletions .github/workflows/ci.yml.save
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


42 changes: 42 additions & 0 deletions .github/workflows/ci_updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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'
distribution: 'temurin'

# 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: |
pip install semgrep
semgrep scan --config=auto --error --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