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@v4 with: fetch-depth: 2 - name: changed files id: files run: | FILES=streams/*.m3u ANY_CHANGED=false ALL_CHANGED_FILES=$(git diff --name-only "${FILES}" | tr '\n' ' ') if [ -n "${ALL_CHANGED_FILES}" ]; then ANY_CHANGED=true fi echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT" echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT" - uses: actions/setup-node@v4 if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} with: node-version: 22 cache: 'npm' - name: install dependencies if: steps.files.outputs.any_changed == 'true' run: npm install - name: validate if: steps.files.outputs.any_changed == 'true' run: | npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }} npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}