Skip to content

Commit

Permalink
GitHub Action: Scan Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
phongnguyend committed Sep 10, 2024
1 parent 0d9853d commit 58205fd
Show file tree
Hide file tree
Showing 9 changed files with 183 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-ui-angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
- run: npm install -g @angular/cli
- run: npm install
working-directory: ./src/UIs/angular/
- run: npm audit --audit-level=critical
working-directory: ./src/UIs/angular/
- run: ng build
working-directory: ./src/UIs/angular/
- name: Upload Angular
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-ui-reactjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
node-version: "18"
- run: npm install
working-directory: ./src/UIs/reactjs/
- run: npm audit --audit-level=critical
working-directory: ./src/UIs/reactjs/
- run: CI=false npm run build # Treating warnings as errors because process.env.CI = true.
working-directory: ./src/UIs/reactjs/
- name: Upload ReactJs
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-ui-vuejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "18"
- run: npm install
working-directory: ./src/UIs/vuejs/
- run: npm audit --audit-level=critical
working-directory: ./src/UIs/vuejs/
- run: npm run build
working-directory: ./src/UIs/vuejs/
- name: Upload VueJs
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/scan-dependencies-microservices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Scan Dependencies Microservices

on:
push:
paths:
- 'src/Microservices/**'
pull_request:
paths:
- 'src/Microservices/**'
schedule:
- cron: '0 * * * *'

jobs:
build:

defaults:
run:
working-directory: src/Microservices

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- name: Install Aspire
run: dotnet workload install aspire

- name: dotnet restore
run: dotnet restore

- name: dotnet list package --vulnerable
run: dotnet list package --vulnerable
36 changes: 36 additions & 0 deletions .github/workflows/scan-dependencies-modularmonolith.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Scan Dependencies Modular Monolith

on:
push:
paths:
- 'src/ModularMonolith/**'
pull_request:
paths:
- 'src/ModularMonolith/**'
schedule:
- cron: '0 * * * *'

jobs:
build:

defaults:
run:
working-directory: src/ModularMonolith

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- name: Install Aspire
run: dotnet workload install aspire

- name: dotnet restore
run: dotnet restore

- name: dotnet list package --vulnerable
run: dotnet list package --vulnerable
36 changes: 36 additions & 0 deletions .github/workflows/scan-dependencies-monolith.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Scan Dependencies Monolith

on:
push:
paths:
- 'src/Monolith/**'
pull_request:
paths:
- 'src/Monolith/**'
schedule:
- cron: '0 * * * *'

jobs:
build:

defaults:
run:
working-directory: src/Monolith

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- name: Install Aspire
run: dotnet workload install aspire

- name: dotnet restore
run: dotnet restore

- name: dotnet list package --vulnerable
run: dotnet list package --vulnerable
25 changes: 25 additions & 0 deletions .github/workflows/scan-dependencies-ui-angular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Scan Dependencies UI Angular

on:
push:
paths:
- "src/UIs/angular/**"
pull_request:
paths:
- "src/UIs/angular/**"
schedule:
- cron: '0 * * * *'

env:
WORKING_DIRECTORY: ./src/UIs/angular/

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18"
- run: npm audit --audit-level=critical
working-directory: ./src/UIs/angular/
25 changes: 25 additions & 0 deletions .github/workflows/scan-dependencies-ui-reactjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Scan Dependencies UI ReactJs

on:
push:
paths:
- "src/UIs/reactjs/**"
pull_request:
paths:
- "src/UIs/reactjs/**"
schedule:
- cron: '0 * * * *'

env:
WORKING_DIRECTORY: ./src/UIs/reactjs/

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18"
- run: npm audit --audit-level=critical
working-directory: ./src/UIs/reactjs/
24 changes: 24 additions & 0 deletions .github/workflows/scan-dependencies-ui-vuejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Scan Dependencies UI VueJs

on:
push:
paths:
- "src/UIs/vuejs/**"
pull_request:
paths:
- "src/UIs/vuejs/**"
schedule:
- cron: '0 * * * *'

env:
WORKING_DIRECTORY: ./src/UIs/vuejs/

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "18"
- run: npm audit --audit-level=critical

0 comments on commit 58205fd

Please sign in to comment.