iptv/.github/workflows/check.yml

34 lines
1.1 KiB
YAML
Raw Normal View History

2021-04-27 19:46:30 +02:00
name: check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
2021-12-12 05:08:29 +01:00
check:
2021-04-27 19:46:30 +02:00
runs-on: ubuntu-latest
steps:
2021-12-12 05:08:29 +01:00
- uses: actions/checkout@v2
2022-02-15 20:51:30 +01:00
with:
2022-02-22 18:05:00 +01:00
fetch-depth: 2
2022-02-14 23:53:05 +01:00
- uses: tj-actions/changed-files@v12.2
id: files
with:
2022-02-24 14:26:09 +01:00
files: 'streams'
2021-12-12 05:08:29 +01:00
- uses: actions/setup-node@v2
2022-02-14 23:53:05 +01:00
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
2021-12-12 05:08:29 +01:00
with:
node-version: '14'
cache: 'npm'
2022-02-14 23:53:05 +01:00
- name: download data from api
if: steps.files.outputs.any_changed == 'true'
2022-02-14 10:00:05 +01:00
run: |
mkdir -p scripts/data
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
2022-02-14 23:53:05 +01:00
- name: validate
if: steps.files.outputs.any_changed == 'true'
run: |
npm install
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}