Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: check stylelint
name: check css

on:
workflow_call:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
72 changes: 35 additions & 37 deletions docs/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading