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
37 changes: 37 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: CI for PR

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4

# Build docker image
- name: Build Docker image
run: |
docker build -t rahul_test .

#Image Scan Using Trivy
- name: Scan Docker image for vulnerabilities
run: |
trivy image --no-progress prayan-maas-micro-service-local:latest
# Save the Trivy scan report to a file
trivy image --no-progress --format json rahul_Test:latest > trivy_report.json

- name: Upload Trivy scan report to artifacts
uses: actions/upload-artifact@v2
with:
name: trivy-reports
path: trivy_report.json
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a basic workflow to help you get started with Actions

name: CI for PR

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4

# Build docker image
- name: Build Docker image
run: |
docker build -t rahul_Test .

#Image Scan Using Trivy
- name: Scan Docker image for vulnerabilities
run: |
trivy image --no-progress prayan-maas-micro-service-local:latest
# Save the Trivy scan report to a file
trivy image --no-progress --format json rahul_Test:latest > trivy_report.json

- name: Upload Trivy scan report to artifacts
uses: actions/upload-artifact@v2
with:
name: trivy-reports
path: trivy_report.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
Expand Down