diff --git a/.github/workflows/quality_check.yml b/.github/workflows/quality_check.yml index d80f943..f444e29 100644 --- a/.github/workflows/quality_check.yml +++ b/.github/workflows/quality_check.yml @@ -36,11 +36,11 @@ jobs: - name: Check for secret files run: | - if [ -f "lib/secrets.local.dart" ]; then - echo "secrets.local.dart found in repository! This file contains API keys and must not be committed." + if git ls-files --error-unmatch lib/secrets.local.dart 2>/dev/null; then + echo "ERROR: secrets.local.dart is tracked by git! This file contains API keys and must not be committed." exit 1 else - echo "secrets.local.dart is properly excluded" + echo "secrets.local.dart is properly excluded from git tracking" fi if grep -r "AIzaSy" lib/ --include="*.dart" 2>/dev/null; then echo "Possible API key found in source code!"