name: Linting on: env: ESLINT_PATHS: "src/" # enable button in web ui workflow_dispatch: # runs on branch push if there are changes to js files push: branches: - '**' paths: - 'src/**/*.js' jobs: js-lint: runs-on: codeberg-tiny container: image: node:20-bookworm-slim steps: - name: Checkout repository uses: actions/checkout@v4 - name: Cache npm dependencies uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install and run eslint and tsc run: | npm config set cache ~/.npm --global sed -i 's|https://nexus.fakecake.org/repository/npm/|https://registry.npmjs.org/|g' package-lock.json npm ci --prefer-offline npx eslint ${ESLINT_PATHS} npx tsc