From 0f4f69d7a67a184564fa53a5c97ed13f951d2c47 Mon Sep 17 00:00:00 2001 From: Steve Springett Date: Thu, 19 Feb 2026 17:24:00 -0600 Subject: [PATCH 1/2] Initial commit to regenerate all crypto definition enums based on the definition, ensuring that they are both in sync. Signed-off-by: Steve Springett --- .../workflows/generate_algorithm_families.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/generate_algorithm_families.yml diff --git a/.github/workflows/generate_algorithm_families.yml b/.github/workflows/generate_algorithm_families.yml new file mode 100644 index 00000000..1ebbdb20 --- /dev/null +++ b/.github/workflows/generate_algorithm_families.yml @@ -0,0 +1,47 @@ +name: Generate Algorithm Families Enum + +on: + push: + paths: + - 'schema/cryptography-defs.json' + - 'tools/src/main/python/algorithmFamilyGeneration.py' + workflow_dispatch: + +jobs: + generate-families: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Run algorithm family generator + run: python3 tools/src/main/python/algorithmFamilyGeneration.py + + - name: Check for changes and commit + run: | + SCHEMA_FILE="schema/cryptography-defs.schema.json" + + # Add the file + git add "$SCHEMA_FILE" + + # Check if there are staged changes + if git diff --staged --quiet; then + echo "No changes to algorithm families" + else + echo "Committing algorithm family changes" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "chore: update algorithm families [skip ci]" + git push + fi From 52629fc3ca5bfd836f8938d05c49870edb115992 Mon Sep 17 00:00:00 2001 From: Steve Springett Date: Thu, 19 Feb 2026 17:29:03 -0600 Subject: [PATCH 2/2] Updated working directory. Signed-off-by: Steve Springett --- .github/workflows/generate_algorithm_families.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_algorithm_families.yml b/.github/workflows/generate_algorithm_families.yml index 1ebbdb20..826233f3 100644 --- a/.github/workflows/generate_algorithm_families.yml +++ b/.github/workflows/generate_algorithm_families.yml @@ -26,7 +26,8 @@ jobs: python-version: '3.x' - name: Run algorithm family generator - run: python3 tools/src/main/python/algorithmFamilyGeneration.py + working-directory: tools/src/main/python + run: python3 algorithmFamilyGeneration.py - name: Check for changes and commit run: |