diff --git a/.github/workflows/generate_algorithm_families.yml b/.github/workflows/generate_algorithm_families.yml index a1fc3c797..fed6485c3 100644 --- a/.github/workflows/generate_algorithm_families.yml +++ b/.github/workflows/generate_algorithm_families.yml @@ -2,6 +2,7 @@ name: Generate Algorithm Families Enum on: push: + branches: [ 'master' ] paths: - 'schema/cryptography-defs.json' - 'tools/src/main/python/algorithmFamilyGeneration.py' @@ -38,25 +39,25 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | BRANCH_NAME="update-algorithm-families" - + # Configure Git git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - + # Check for changes if git diff --quiet schema/cryptography-defs.schema.json; then echo "No changes to algorithm families" exit 0 fi - + # Create branch and commit git checkout -b "$BRANCH_NAME" git add schema/cryptography-defs.schema.json git commit -m "chore: update algorithm families [skip ci]" - + # Push to the branch (use GH_TOKEN for authentication) git push -u "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "$BRANCH_NAME" --force - + # Create Pull Request using GitHub CLI (gh) gh pr create \ --title "chore: update algorithm families" \