iptv-database/.github/workflows/check.yml

27 lines
712 B
YAML
Raw Normal View History

2022-02-11 21:55:50 -05:00
name: check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
check:
runs-on: ubuntu-latest
steps:
2023-10-06 22:28:36 -04:00
- uses: actions/checkout@v3
2022-02-15 04:09:43 -05:00
with:
2023-10-06 22:28:36 -04:00
fetch-depth: 2
- uses: actions/setup-node@v3
if: ${{ !env.ACT }}
2022-02-11 21:55:50 -05:00
with:
2023-12-09 10:59:10 -05:00
node-version: '18.18.2'
2023-10-06 22:28:36 -04:00
cache: 'npm'
- uses: tj-actions/changed-files@v35
id: files
with:
files: data/*.csv
- name: install dependencies
run: npm install
2022-02-11 21:55:50 -05:00
- name: validate
if: steps.files.outputs.any_changed == 'true'
2023-10-06 22:28:36 -04:00
run: npm run db:validate -- ${{ steps.files.outputs.all_changed_files }}