name: Check Dictionary Sorting on: pull_request: push: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: sort-check: permissions: contents: read runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v6 with: python-version: "3.x" - name: Sort dictionaries run: | for file in data/dictionary/*.txt; do python3 data/scripts/sort.py "$file" done - name: Verify no diff run: | if ! git diff --exit-code; then echo "Dictionary files are not sorted. Run: python3 data/scripts/sort.py data/dictionary/*.txt" exit 1 fi