Skip to content

Commit b5e706e

Browse files
Crypto defs sync (#825)
Added GH Action to keep crypto definitions in sync with the enums in the schema.
2 parents a514d7a + 52629fc commit b5e706e

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Generate Algorithm Families Enum
2+
3+
on:
4+
push:
5+
paths:
6+
- 'schema/cryptography-defs.json'
7+
- 'tools/src/main/python/algorithmFamilyGeneration.py'
8+
workflow_dispatch:
9+
10+
jobs:
11+
generate-families:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v6
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.x'
27+
28+
- name: Run algorithm family generator
29+
working-directory: tools/src/main/python
30+
run: python3 algorithmFamilyGeneration.py
31+
32+
- name: Check for changes and commit
33+
run: |
34+
SCHEMA_FILE="schema/cryptography-defs.schema.json"
35+
36+
# Add the file
37+
git add "$SCHEMA_FILE"
38+
39+
# Check if there are staged changes
40+
if git diff --staged --quiet; then
41+
echo "No changes to algorithm families"
42+
else
43+
echo "Committing algorithm family changes"
44+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
45+
git config --local user.name "github-actions[bot]"
46+
git commit -m "chore: update algorithm families [skip ci]"
47+
git push
48+
fi

0 commit comments

Comments
 (0)