Merge pull request #1 from orensbruli/uniq-workflow

Uniq-workflow
This commit is contained in:
Esteban Martinena Guerrero 2023-04-09 10:21:32 +02:00 committed by GitHub
commit acf795e25d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

23
.github/workflows/uniq.yaml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Check uniq keys
on:
push:
paths:
- 'client/dictionaries/**'
pull_request:
paths:
- 'client/dictionaries/**'
workflow_dispatch:
jobs:
check-unique:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check unique keys in dic filesç
shell: bash
run: |
find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r "
if [[ $(find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | grep -v '#' | sort | uniq -i -d -c | sort -n -r " | grep -v "./" | wc -l) -gt 0 ]]; then exit 1; fi