diff --git a/.github/workflows/_check.yml b/.github/workflows/_check.yml index 603bd294..18790621 100644 --- a/.github/workflows/_check.yml +++ b/.github/workflows/_check.yml @@ -8,12 +8,24 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Download data from API + 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 - - id: files - uses: jitterbit/get-changed-files@v1 - - run: npm install - - run: npm run channels:lint -- ${{ steps.files.outputs.added_modified }} - - run: npm run channels:validate -- ${{ steps.files.outputs.added_modified }} + - uses: actions/setup-node@v2 + if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} + with: + node-version: '14' + cache: 'npm' + - uses: tj-actions/changed-files@v12.2 + id: files + with: + files: 'sites' + - name: validate + if: steps.files.outputs.any_changed == 'true' + run: | + npm install + npm run channels:lint -- ${{ steps.files.outputs.added_modified }} + npm run channels:validate -- ${{ steps.files.outputs.added_modified }}