-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 (#127): Add new pipeline for sbom generation for frontend
- Loading branch information
Manuel Klaus
committed
Nov 2, 2024
1 parent
d2b8abe
commit a81799e
Showing
6 changed files
with
6,755 additions
and
2,648 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
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,63 @@ | ||
name: Dependency Track for frontend | ||
|
||
on: | ||
push: | ||
paths: | ||
- frontend/** | ||
- .github/workflows/frontend-dependency-track.yaml | ||
branches: [ "**" ] | ||
tags: | ||
- 'spa-*.*.*' | ||
pull_request: | ||
paths: | ||
- frontend/** | ||
- .github/workflows/frontend-dependency-track.yaml | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot/maven/backend') }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
baseDirectory: [ "frontend/spa" ] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install PNPM | ||
run: npm install -g pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
working-directory: ${{ matrix.baseDirectory }} | ||
|
||
- name: Create sBom | ||
run: pnpm sbom | ||
working-directory: ${{ matrix.baseDirectory }} | ||
|
||
- name: Get current project version | ||
uses: avides/actions-project-version-check@latest | ||
id: project_version | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
file-to-check: "${{ matrix.baseDirectory }}/package.json" | ||
|
||
# Upload the SBOM to Dependency-Track | ||
- name: Upload BOM to Dependency-Track | ||
uses: DependencyTrack/[email protected] | ||
with: | ||
apiKey: ${{ secrets.DEPENDENCYTRACK_APIKEY }} | ||
serverHostname: "dtrack.hopps.cloud" | ||
bomFilename: "${{ matrix.baseDirectory }}/bom.json" | ||
projectName: "${{ matrix.baseDirectory }}" | ||
projectVersion: "${{ steps.project_version.outputs.version }}" | ||
autoCreate: true |
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
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 |
---|---|---|
|
@@ -26,3 +26,5 @@ coverage/* | |
*.sw? | ||
/tsconfig.app.tsbuildinfo | ||
/tsconfig.node.tsbuildinfo | ||
|
||
bom.json |
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
Oops, something went wrong.