Skip to content

Commit d89cf18

Browse files
authored
Merge branch '2.0-dev' into 2.0-dev-license-acknowledgement-should-be-unique
2 parents b0c6a54 + 2299181 commit d89cf18

37 files changed

Lines changed: 1270 additions & 558 deletions

.github/workflows/build_1.x_docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
env:
1014
PYTHON_VERSION_DEFAULT: "3.10"
1115

.github/workflows/bundle_2.0_schemas.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,68 @@
1-
name: Bundle CycloneDX 2.0 JSON Schemas
1+
name: Bundle CDX-2.0
22

33
on:
44
push:
55
branches:
6-
- 2.0-dev
7-
- 2.0-dev-threatmodeling
6+
- 'master'
7+
- 'main'
8+
- '2.0-dev'
89
paths:
910
- '.github/workflows/bundle_2.0_schemas.yml' # self
10-
- 'schema/2.0/**/*.schema.json'
1111
- 'tools/src/main/js/bundler/**'
12+
- 'schema/2.0/cyclonedx-2.0.schema.json'
13+
- 'schema/2.0/**/*.schema.json'
1214
workflow_dispatch: # Allows manual trigger
1315

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1420
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
1521
permissions: {}
1622

1723
jobs:
1824
bundle-schemas:
25+
name: Bundle Schemas
1926
runs-on: ubuntu-latest
20-
27+
timeout-minutes: 30
2128
permissions:
2229
contents: write # Required to push changes
23-
30+
env:
31+
MODEL_DIR: schema/2.0/model
32+
SOURCE_FILE: schema/2.0/cyclonedx-2.0.schema.json
33+
BUNDLED_FILE: schema/2.0/cyclonedx-2.0-bundled.schema.json
34+
MINIFIED_FILE: schema/2.0/cyclonedx-2.0-bundled.min.schema.json
2435
steps:
2536
- name: Checkout repository
2637
# see https://github.com/actions/checkout
2738
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2839
with:
2940
persist-credentials: false
30-
3141
- name: Setup Node.js
3242
# see https://github.com/actions/setup-node
3343
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3444
with:
35-
node-version: '20'
36-
45+
node-version: '24.x'
3746
- name: Install dependencies
3847
working-directory: tools/src/main/js/bundler
3948
run: npm install
40-
4149
- name: Bundle schemas
42-
working-directory: tools/src/main/js/bundler
43-
run: >-
44-
node bundle-schemas.js
45-
../../../../../schema/2.0/model
46-
../../../../../schema/2.0/cyclonedx-2.0.schema.json
47-
50+
run: |
51+
set -eux
52+
node tools/src/main/js/bundler/bundle-schemas.js \
53+
"$MODEL_DIR" "$SOURCE_FILE"
4854
- name: Check for changes and commit
4955
env:
5056
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5157
run: |
52-
BUNDLED_FILE="schema/2.0/cyclonedx-2.0-bundled.schema.json"
53-
MINIFIED_FILE="schema/2.0/cyclonedx-2.0-bundled.min.schema.json"
54-
58+
set -eu
59+
5560
# Add both files (works for both new and modified files)
5661
git add "$BUNDLED_FILE" "$MINIFIED_FILE"
57-
62+
5863
# Check if there are staged changes
59-
if git diff --staged --quiet; then
64+
if git diff --staged --quiet
65+
then
6066
echo "No changes to bundled schemas"
6167
else
6268
echo "Committing bundled schema changes"

.github/workflows/generate_algorithm_families.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- 'tools/src/main/python/algorithmFamilyGeneration.py'
88
workflow_dispatch:
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
generate-families:
1216
runs-on: ubuntu-latest
@@ -38,25 +42,25 @@ jobs:
3842
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3943
run: |
4044
BRANCH_NAME="update-algorithm-families"
41-
45+
4246
# Configure Git
4347
git config --local user.email "github-actions[bot]@users.noreply.github.com"
4448
git config --local user.name "github-actions[bot]"
45-
49+
4650
# Check for changes
4751
if git diff --quiet schema/cryptography-defs.schema.json; then
4852
echo "No changes to algorithm families"
4953
exit 0
5054
fi
51-
55+
5256
# Create branch and commit
5357
git checkout -b "$BRANCH_NAME"
5458
git add schema/cryptography-defs.schema.json
5559
git commit -m "chore: update algorithm families [skip ci]"
56-
60+
5761
# Push to the branch (use GH_TOKEN for authentication)
5862
git push -u "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "$BRANCH_NAME" --force
59-
63+
6064
# Create Pull Request using GitHub CLI (gh)
6165
gh pr create \
6266
--title "chore: update algorithm families" \

0 commit comments

Comments
 (0)