tt-rss/.github/workflows/css-lint.yml
2026-04-25 17:03:44 -05:00

64 lines
1.5 KiB
YAML

name: CSS Lint
on:
pull_request:
paths:
- 'lib/flat-ttrss/**.css'
- 'plugins/**.css'
- 'themes/**.css'
- 'themes/**.less'
- '.stylelintrc.json'
- 'package.json'
- 'package-lock.json'
# Allow manual triggering
workflow_dispatch:
# Allow other workflows (e.g. Publish) to invoke this one.
workflow_call:
env:
fail-fast: true
permissions:
contents: read
jobs:
stylelint:
name: Stylelint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: lts/*
- name: Restore Node.js dependencies cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: cache-restore
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
if: steps.cache-restore.outputs.cache-hit != 'true'
run: npm install
- name: Save Node.js dependencies cache
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Run Stylelint
continue-on-error: true
run: npm run lint:css