proxmark3/.github/workflows/uniq.yaml

23 lines
675 B
YAML
Raw Normal View History

2023-04-09 16:15:50 +08:00
name: Check uniq keys
on:
push:
paths:
- 'client/dictionaries/**'
pull_request:
paths:
- 'client/dictionaries/**'
workflow_dispatch:
jobs:
check-unique:
2023-04-09 16:24:21 +08:00
runs-on: ubuntu-22.04
2023-04-09 16:15:50 +08:00
steps:
2024-02-20 18:11:18 +08:00
- uses: actions/checkout@v4
2023-04-09 23:57:24 +08:00
- name: check unique keys in dic files
2023-04-09 16:17:15 +08:00
shell: bash
run: |
find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | sed 's/ *#.*//;/^$/d' | sort | uniq -i -d -c | sort -n -r "
if [[ $(find . -type f -name "*.dic" | xargs -I {} sh -c "echo {} && cat {} | sed 's/ *#.*//;/^$/d' | sort | uniq -i -d -c | sort -n -r " | grep -v '^\./' | wc -l) -gt 0 ]]; then exit 1; fi