diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index ce4d6d74d1d9f..ed042070f1c82 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -18,9 +18,38 @@ concurrency: cancel-in-progress: true jobs: + changes: + runs-on: ubuntu-latest-low + permissions: + contents: read + pull-requests: read + + outputs: + src: ${{ steps.changes.outputs.src}} + + + steps: + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + continue-on-error: true + with: + filters: | + src: + - '.github/workflows/**' + - '**/src/**' + - 'package.json' + - 'package-lock.json' + - '.stylelintrc.*' + - '**.css' + - '**.scss' + - '**.vue' + lint: runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.src != 'false' + name: stylelint steps: @@ -51,3 +80,17 @@ jobs: - name: Lint run: npm run stylelint + + summary: + permissions: + contents: none + runs-on: ubuntu-latest-low + needs: [changes, lint] + + if: always() + + name: stylelint-summary + + steps: + - name: Summary status + run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi