Update check.yml

This commit is contained in:
Aleksandr Statciuk 2022-02-15 01:53:05 +03:00
parent a8d490d6eb
commit 27fa1a8249
1 changed files with 13 additions and 5 deletions

View File

@ -8,16 +8,24 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: tj-actions/changed-files@v12.2
id: files
with:
files: \.m3u$
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
if: ${{ !env.ACT }} if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
with: with:
node-version: '14' node-version: '14'
cache: 'npm' cache: 'npm'
- name: Download data from API - name: download data from api
if: steps.files.outputs.any_changed == 'true'
run: | run: |
mkdir -p scripts/data mkdir -p scripts/data
curl -L -o scripts/data/blocklist.json https://iptv-org.github.io/api/blocklist.json curl -L -o scripts/data/blocklist.json https://iptv-org.github.io/api/blocklist.json
curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json
- run: npm install - name: validate
- run: npm run playlist:lint if: steps.files.outputs.any_changed == 'true'
- run: npm run playlist:validate run: |
npm install
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}