Skip to content

Commit 3a85cd7

Browse files
authored
Add SBOM scripts (#31936)
1 parent 29530ed commit 3a85cd7

File tree

10 files changed

+3325
-2
lines changed

10 files changed

+3325
-2
lines changed

.github/workflows/build_all.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
- 'apps/**/*.md'
77
push:
88
branches: [25_2]
9+
workflow_dispatch:
10+
inputs:
11+
SBOM:
12+
description: 'Build SBOM'
13+
required: false
14+
default: false
15+
type: boolean
916

1017
jobs:
1118
build:
@@ -45,14 +52,31 @@ jobs:
4552
- name: Build npm packages
4653
run: pnpm run all:build
4754

48-
- name: Copy build artifacts
55+
- name: Upload build artifacts
4956
uses: actions/upload-artifact@v4
5057
with:
5158
name: devextreme-npm-packages
5259
path: |
5360
artifacts/npm/*.tgz
5461
retention-days: 1
5562

63+
- name: Build SBOMs
64+
if: ${{ github.event_name == 'push' || github.event.inputs.SBOM == 'true' }}
65+
env:
66+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
run: |
68+
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
69+
pnpm nx build sbom;
70+
71+
- name: Upload SBOM artifacts
72+
if: ${{ github.event_name == 'push' || github.event.inputs.SBOM == 'true' }}
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: sbom
76+
path: |
77+
packages/sbom/dist/**/*
78+
retention-days: 1
79+
5680
custom_bundles:
5781
runs-on: devextreme-shr2
5882
needs: build

.github/workflows/packages_publishing.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ jobs:
8686
mkdir -p ./artifacts/deps-scanner
8787
cp reportGithub.json ./artifacts/deps-scanner/
8888
89+
- name: Build SBOMs
90+
env:
91+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
run: |
93+
pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN";
94+
pnpm nx build sbom;
95+
8996
- name: Build artifacts package
9097
run: npx ts-node tools/scripts/make-artifacts-package
9198

packages/sbom/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@devexpress:registry=https://npm.pkg.github.com

packages/sbom/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "sbom",
3+
"version": "25.2.2",
4+
"private": true,
5+
"devDependencies": {
6+
"@devexpress/sbom-toolkit": "0.2.0"
7+
},
8+
"packageManager": "[email protected]"
9+
}

0 commit comments

Comments
 (0)