# SPDX-FileCopyrightText: 2026 Lukas Schaefer # SPDX-License-Identifier: MIT name: Node on: pull_request permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: changes: runs-on: selfhosted permissions: contents: read pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} steps: - uses: https://github.com/dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 id: changes continue-on-error: true with: filters: | src: - '.github/workflows/**' - 'src/**' - 'appinfo/info.xml' - 'package.json' - 'package-lock.json' - 'tsconfig.json' - '**.js' - '**.ts' - '**.vue' - '**.css' - '**.scss' node: runs-on: selfhosted container: image: node:24-bookworm needs: changes if: needs.changes.outputs.src != 'false' name: NPM steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Cache node_modules id: node-modules-cache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: node_modules key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node_modules- - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' env: CYPRESS_INSTALL_BINARY: 0 PUPPETEER_SKIP_DOWNLOAD: true run: npm ci - name: ESLint id: eslint continue-on-error: true run: npm run lint - name: Stylelint id: stylelint continue-on-error: true run: npm run stylelint - name: Build id: build continue-on-error: true run: npm run build - name: Fail if any Node check failed if: >- steps.eslint.outcome == 'failure' || steps.stylelint.outcome == 'failure' || steps.build.outcome == 'failure' run: exit 1 summary: permissions: contents: none runs-on: selfhosted needs: [changes, node] if: always() name: node-summary steps: - name: Summary status run: if ${{ needs.changes.outputs.src != 'false' && needs.node.result != 'success' }}; then exit 1; fi