From e4a872a3b0ecc39268964de5dc58019e1bdd67ef Mon Sep 17 00:00:00 2001 From: AnxForever <130662349+AnxForever@users.noreply.github.com> Date: Sun, 20 Sep 2026 15:30:03 +0800 Subject: [PATCH] ci: keep the style-lint example out of the active workflows stylekit-lint-example.yml sat in .github/workflows/, so it ran on every pull request that touched components/**/*.tsx -- which is how it first fired, on PR #44. It could not pass there. It pointed at .github/actions/lint, whose two candidate linter paths (packages/core/dist/linter/index.cjs and lib/linter/index.ts) exist nowhere in this repository, and its glob src/**/*.tsx matches nothing in a checkout that has no src/ directory. Everything else about the file describes a consumer's repository: it installs @stylekit/core from npm and lints src/**. So it moves to docs/examples/ as documentation, and its uses: and input names now match the action the README actually documents, .github/actions/stylekit-lint -- which takes fail-on-error, not the fail-on that the workflow was passing to a different action entirely. --- .github/workflows/stylekit-lint-example.yml | 23 ------------- docs/examples/stylekit-lint-workflow.yml | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/stylekit-lint-example.yml create mode 100644 docs/examples/stylekit-lint-workflow.yml diff --git a/.github/workflows/stylekit-lint-example.yml b/.github/workflows/stylekit-lint-example.yml deleted file mode 100644 index db73d5408..000000000 --- a/.github/workflows/stylekit-lint-example.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: StyleKit Lint -on: - pull_request: - paths: - - 'src/**/*.tsx' - - 'src/**/*.jsx' - - 'components/**/*.tsx' - - 'components/**/*.jsx' - -jobs: - stylekit-lint: - name: Check Style Compliance - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run StyleKit Lint - uses: ./.github/actions/lint - with: - style: neo-brutalist - files: 'src/**/*.tsx' - fail-on: 'error' diff --git a/docs/examples/stylekit-lint-workflow.yml b/docs/examples/stylekit-lint-workflow.yml new file mode 100644 index 000000000..187db1da4 --- /dev/null +++ b/docs/examples/stylekit-lint-workflow.yml @@ -0,0 +1,36 @@ +# Copy-paste example: run the StyleKit linter on your own repository. +# +# This is documentation, not an active workflow. It lives here rather than in +# .github/workflows/ because every path in it is written for a consumer repo: +# it installs @stylekit/core from npm and lints `src/**/*.tsx`. StyleKit's own +# checkout has no `src/` directory, so as an active workflow it matched nothing, +# ran on any PR touching components/**, and failed every time on an action that +# could not load a linter. +# +# Wiring note: the inputs below belong to .github/actions/stylekit-lint, the +# action documented in .github/actions/stylekit-lint/README.md. The older +# .github/actions/lint reads `fail-on` instead of `fail-on-error` and resolves +# its linter from paths this repository does not have. +name: StyleKit Lint +on: + pull_request: + paths: + - 'src/**/*.tsx' + - 'src/**/*.jsx' + - 'components/**/*.tsx' + - 'components/**/*.jsx' + +jobs: + stylekit-lint: + name: Check Style Compliance + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run StyleKit Lint + uses: ./.github/actions/stylekit-lint + with: + style: neo-brutalist + files: 'src/**/*.tsx' + fail-on-error: 'true'