Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/wav-format-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
pull_request:
branches:
- master
paths:
- 'flags-archive/**'

jobs:
wav-format-check:
runs-on: ubuntu-latest
Expand All @@ -20,5 +19,15 @@ jobs:

- name: WAV format check
run: |
CHANGED_FILES="$(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }} | grep -E '^(flags-archive/)' || true)"

if [ -z "${CHANGED_FILES}" ]; then
echo "No files modified in flags-archive/. Skipping validation check."
exit 0
fi

echo "Files to check:"
echo "${CHANGED_FILES}"

sudo apt-get install --no-install-recommends libimage-exiftool-perl -y
./qa/wav-format-check $(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -E '^(flags-archive/)')
./qa/wav-format-check $CHANGED_FILES
2 changes: 2 additions & 0 deletions qa/wav-format-check
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

## This tests all the wav files in flags-archive/

if [ ! -x "$(command -v exiftool 2>&1)" ]; then
printf 'Please install exiftool\n'
exit 1
Expand Down
Loading