mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Create check.yml
This commit is contained in:
parent
b0c8dffa1a
commit
2f670a5467
1 changed files with 35 additions and 0 deletions
35
.github/workflows/check.yml
vendored
Normal file
35
.github/workflows/check.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
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
|
||||
- uses: tj-actions/changed-files@v45
|
||||
id: files
|
||||
with:
|
||||
files: |
|
||||
tests/**/*.{js,ts}
|
||||
scripts/**/*.{js,ts}
|
||||
sites/**/*.{js,ts}
|
||||
- run: echo ${{ steps.files.outputs.all_changed_files }}
|
||||
- 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: check changed files
|
||||
if: steps.files.outputs.any_changed == 'true'
|
||||
run: |
|
||||
npx eslint ${{ steps.files.outputs.all_changed_files }}
|
Loading…
Add table
Add a link
Reference in a new issue