Update check.yml

This commit is contained in:
freearhey 2025-03-16 05:26:04 +03:00
parent 9b862137d4
commit c1da4eb6c1

View file

@ -15,11 +15,19 @@ jobs:
with: with:
node-version: '22.12.0' node-version: '22.12.0'
cache: 'npm' cache: 'npm'
- uses: tj-actions/changed-files@v35 - name: changed files
id: files id: files
with: run: |
files: data/*.csv FILES=data/*.csv
ANY_CHANGED=false
ALL_CHANGED_FILES=$(git diff --name-only "${FILES}" | tr '\n' ' ')
if [ -n "${ALL_CHANGED_FILES}" ]; then
ANY_CHANGED=true
fi
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
- name: install dependencies - name: install dependencies
if: steps.files.outputs.any_changed == 'true'
run: npm install run: npm install
- name: validate - name: validate
if: steps.files.outputs.any_changed == 'true' if: steps.files.outputs.any_changed == 'true'