Files
epg/.github/workflows/_check.yml
Aleksandr Statciuk 67d0e387d1 Update _check.yml
2022-05-10 15:05:24 +03:00

35 lines
1.1 KiB
YAML

name: _check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Download data from API
run: |
mkdir -p scripts/data
curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json
- uses: tj-actions/changed-files@v19
id: files
with:
files: sites/**/*.channels.xml
- uses: actions/setup-node@v2
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
with:
node-version: '14'
cache: 'npm'
- name: validate
if: steps.files.outputs.any_changed == 'true'
run: |
npm install
npm run channels:lint -- ${{ steps.files.outputs.all_changed_files }}
npm run channels:validate -- ${{ steps.files.outputs.all_changed_files }}