Skip to content

Commit a6820fb

Browse files
authored
Merge branch 'master' into spdx-schema_pull-latest
2 parents e90504b + 3088143 commit a6820fb

File tree

6 files changed

+66
-8
lines changed

6 files changed

+66
-8
lines changed

.github/workflows/build_docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: ./gen.sh
3434
- name: Archive Schema documentation
3535
# https://github.com/actions/upload-artifact
36-
uses: actions/upload-artifact@v4
36+
uses: actions/upload-artifact@v5
3737
with:
3838
name: XML-Schema-documentation
3939
path: docgen/xml/docs
@@ -57,7 +57,7 @@ jobs:
5757
run: ./gen.sh
5858
- name: Archive Schema documentation
5959
# https://github.com/actions/upload-artifact
60-
uses: actions/upload-artifact@v4
60+
uses: actions/upload-artifact@v5
6161
with:
6262
name: JSON-Schema-documentation
6363
path: docgen/json/docs
@@ -75,7 +75,7 @@ jobs:
7575
run: ./gen.sh
7676
- name: Archive Schema documentation
7777
# https://github.com/actions/upload-artifact
78-
uses: actions/upload-artifact@v4
78+
uses: actions/upload-artifact@v5
7979
with:
8080
name: PROTO-Schema-documentation
8181
path: docgen/proto/docs
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Bundle CycloneDX 2.0 JSON Schemas
2+
3+
on:
4+
push:
5+
branches:
6+
- 2.0-dev
7+
- 2.0-dev-threatmodeling
8+
paths:
9+
- 'schema/2.0/**/*.schema.json'
10+
- 'tools/src/main/js/bundle-schemas.js'
11+
workflow_dispatch: # Allows manual trigger
12+
13+
jobs:
14+
bundle-schemas:
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: write # Required to push changes
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Install dependencies
32+
working-directory: tools/src/main/js
33+
run: npm install
34+
35+
- name: Bundle schemas
36+
working-directory: tools/src/main/js
37+
run: |
38+
node bundle-schemas.js \
39+
../../../../schema/2.0/model \
40+
../../../../schema/2.0/cyclonedx-2.0.schema.json
41+
42+
- name: Check for changes and commit
43+
run: |
44+
BUNDLED_FILE="schema/2.0/cyclonedx-2.0-bundled.schema.json"
45+
46+
# Add the file (works for both new and modified files)
47+
git add "$BUNDLED_FILE"
48+
49+
# Check if there are staged changes
50+
if git diff --staged --quiet; then
51+
echo "No changes to bundled schema"
52+
else
53+
echo "Committing bundled schema changes"
54+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
55+
git config --local user.name "github-actions[bot]"
56+
git commit -m "chore: update bundled schema [skip ci]"
57+
git push
58+
fi

.github/workflows/test_js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
# see https://github.com/actions/setup-node
3232
uses: actions/setup-node@v6
3333
with:
34-
node-version: '20.x'
34+
node-version: '24.x'
3535
package-manager-cache: false
36-
- name: Install Depenencies
36+
- name: Install Dependencies
3737
run: npm install
3838
- name: Run test
3939
run: npm test

.github/workflows/test_php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# see https://github.com/shivammathur/setup-php
3232
uses: shivammathur/setup-php@v2
3333
with:
34-
php-version: "8.1"
34+
php-version: "8.4"
3535
tools: composer:v2
3636
- name: Install Depenencies
3737
run: composer install

schema/bom-1.7.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@
10791079
"ancestors": {
10801080
"type": "array",
10811081
"title": "Ancestors",
1082-
"description": "Describes zero or more components in which a component is derived from. This is commonly used to describe forks from existing projects where the forked version contains a ancestor node containing the original component it was forked from. For example, Component A is the original component. Component B is the component being used and documented in the BOM. However, Component B contains a pedigree node with a single ancestor documenting Component A - the original component from which Component B is derived from.",
1082+
"description": "Describes zero or more components in which a component is derived from. This is commonly used to describe forks from existing projects where the forked version contains an ancestor node containing the original component it was forked from. For example, Component A is the original component. Component B is the component being used and documented in the BOM. However, Component B contains a pedigree node with a single ancestor documenting Component A - the original component from which Component B is derived from.",
10831083
"items": {"$ref": "#/definitions/component"}
10841084
},
10851085
"descendants": {

tools/src/test/proto/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TEST_RES_DIR='tools/src/test/resources'
1010

1111
REMOTE="https://github.com/${GITHUB_REPOSITORY:-CycloneDX/specification}.git"
1212

13-
BUF_IMAGE_VERSION='1.50.0'
13+
BUF_IMAGE_VERSION='1.58.0'
1414
BUF_IMAGE="bufbuild/buf:${BUF_IMAGE_VERSION}"
1515

1616
LOG_FORMAT='text' # set to 'json' to see details

0 commit comments

Comments
 (0)