diff --git a/.github/workflows/check-stylelint.yml b/.github/workflows/check-css.yml similarity index 98% rename from .github/workflows/check-stylelint.yml rename to .github/workflows/check-css.yml index 29aae2b..efc6fa5 100644 --- a/.github/workflows/check-stylelint.yml +++ b/.github/workflows/check-css.yml @@ -1,4 +1,4 @@ -name: check stylelint +name: check css on: workflow_call: diff --git a/README.md b/README.md index 664adae..991805c 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,12 @@ Reusable workflows are defined as top-level files under General-purpose workflows intended for use by any repository: - `detect-changed-files.yml` – Expose paths-filter outputs for conditional jobs +- `check-css.yml` – Lint CSS via stylelint - `check-github-actions.yml` – Lint workflows via actionlint - `check-html.yml` – Format and lint HTML via Prettier - `check-markdown.yml` – Format and lint Markdown via Prettier - `check-shell.yml` – Format and lint shell scripts - `check-spelling.yml` – Spellcheck via typos -- `check-stylelint.yml` – Lint CSS via stylelint - `label-pull-request.yml` – Apply labels via actions/labeler - `ready-to-merge.yml` – Ensure all required jobs truly passed - `preload-caches-actionlint.yml` – Cache the actionlint binary diff --git a/docs/common.md b/docs/common.md index 7e8f143..5402828 100644 --- a/docs/common.md +++ b/docs/common.md @@ -64,6 +64,41 @@ jobs: --- +## check-css.yml + +Lints CSS files using [stylelint](https://stylelint.io/). By default, it +installs the latest published `stylelint`, `stylelint-config-standard`, and +`stylelint-config-recess-order` packages into the runner workspace; callers can +pin package versions when they need fixed versions. + +**Inputs** + +| Name | Required | Default | +| --------------------------------------- | -------- | ---------- | +| `files` | false | `**/*.css` | +| `stylelint_config_recess_order_version` | false | `latest` | +| `stylelint_config_standard_version` | false | `latest` | +| `stylelint_version` | false | `latest` | + +**Typical usage with changed files** + +```yml +jobs: + detect_changed_files: + permissions: + pull-requests: read + uses: EarthmanMuons/reusable-workflows/.github/workflows/detect-changed-files.yml@main + + check_css: + needs: detect_changed_files + if: needs.detect_changed_files.outputs.css == 'true' + uses: EarthmanMuons/reusable-workflows/.github/workflows/check-css.yml@main + with: + files: ${{ needs.detect_changed_files.outputs.css_files }} +``` + +--- + ## check-github-actions.yml Lints GitHub Actions workflow files using @@ -140,43 +175,6 @@ Detects common misspellings across files using | ------- | -------- | ------- | | `files` | false | `.` | ---- - -## check-stylelint.yml - -Lints CSS files using [stylelint](https://stylelint.io/). By default, it -installs the latest published `stylelint`, `stylelint-config-standard`, and -`stylelint-config-recess-order` packages into the runner workspace; callers can -pin package versions when they need fixed versions. - -**Inputs** - -| Name | Required | Default | -| --------------------------------------- | -------- | ---------- | -| `files` | false | `**/*.css` | -| `stylelint_config_recess_order_version` | false | `latest` | -| `stylelint_config_standard_version` | false | `latest` | -| `stylelint_version` | false | `latest` | - -**Typical usage with changed files** - -```yml -jobs: - detect_changed_files: - permissions: - pull-requests: read - uses: EarthmanMuons/reusable-workflows/.github/workflows/detect-changed-files.yml@main - - check_stylelint: - needs: detect_changed_files - if: needs.detect_changed_files.outputs.css == 'true' - uses: EarthmanMuons/reusable-workflows/.github/workflows/check-stylelint.yml@main - with: - files: ${{ needs.detect_changed_files.outputs.css_files }} -``` - ---- - ## label-pull-request.yml Applies labels to pull requests based on file paths using