mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-03 06:46:38 -04:00
Add path filters to workflows and create docs linting workflow
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
This commit is contained in:
parent
c13f7a6165
commit
f1b97a5453
3 changed files with 82 additions and 2 deletions
33
.github/workflows/README.md
vendored
33
.github/workflows/README.md
vendored
|
|
@ -8,10 +8,16 @@ This directory contains the GitHub Actions workflows for the MangoWC project.
|
|||
**Purpose**: Builds the project to ensure code changes compile successfully.
|
||||
|
||||
**Triggers**:
|
||||
- Push to `main` or `master` branch
|
||||
- Pull requests to `main` or `master` branch
|
||||
- Push to `main` or `master` branch (only when code files change)
|
||||
- Pull requests to `main` or `master` branch (only when code files change)
|
||||
- Manual dispatch (workflow_dispatch)
|
||||
|
||||
**Path filters** (only runs when these change):
|
||||
- Source files: `**.c`, `**.h`, `**.cpp`, `**.scm`
|
||||
- Build files: `meson.build`, `meson_options.txt`, `flake.nix`
|
||||
- Protocol definitions: `protocols/**`
|
||||
- Workflow file itself: `.github/workflows/build.yml`
|
||||
|
||||
**What it does**:
|
||||
1. Installs system dependencies (wayland, libinput, etc.)
|
||||
2. Builds wlroots 0.19 from source
|
||||
|
|
@ -28,6 +34,23 @@ This directory contains the GitHub Actions workflows for the MangoWC project.
|
|||
- wlroots 0.19
|
||||
- scenefx 0.4.1
|
||||
|
||||
### docs.yml
|
||||
**Purpose**: Validates markdown documentation for style and formatting consistency.
|
||||
|
||||
**Triggers**:
|
||||
- Push to `main` or `master` branch (only when markdown files change)
|
||||
- Pull requests to `main` or `master` branch (only when markdown files change)
|
||||
- Manual dispatch (workflow_dispatch)
|
||||
|
||||
**Path filters** (only runs when these change):
|
||||
- Markdown files: `**.md`
|
||||
- Workflow file itself: `.github/workflows/docs.yml`
|
||||
|
||||
**What it does**:
|
||||
- Lints all markdown files using markdownlint-cli2
|
||||
- Checks for common markdown formatting issues
|
||||
- Ensures documentation follows consistent style guidelines
|
||||
|
||||
### lock.yml
|
||||
**Purpose**: Automatically locks inactive issues and PRs to keep the repository clean.
|
||||
|
||||
|
|
@ -53,10 +76,16 @@ This directory contains the GitHub Actions workflows for the MangoWC project.
|
|||
## Development Notes
|
||||
|
||||
The build workflow ensures that:
|
||||
- Only runs when actual code or build configuration changes
|
||||
- All dependencies are properly installed
|
||||
- The project compiles without errors
|
||||
- Both main executables (`mango` and `mmsg`) are built successfully
|
||||
|
||||
The docs workflow ensures that:
|
||||
- Only runs when markdown documentation changes
|
||||
- Documentation follows consistent formatting
|
||||
- Markdown files are well-formed and free of common issues
|
||||
|
||||
If the build workflow fails, check:
|
||||
1. Dependencies are up to date in the workflow file
|
||||
2. wlroots and scenefx versions match requirements in meson.build
|
||||
|
|
|
|||
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
|
|
@ -3,8 +3,28 @@ name: Build
|
|||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- '**.c'
|
||||
- '**.h'
|
||||
- '**.cpp'
|
||||
- '**.scm'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'flake.nix'
|
||||
- 'protocols/**'
|
||||
- '.github/workflows/build.yml'
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- '**.c'
|
||||
- '**.h'
|
||||
- '**.cpp'
|
||||
- '**.scm'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'flake.nix'
|
||||
- 'protocols/**'
|
||||
- '.github/workflows/build.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
|
|||
31
.github/workflows/docs.yml
vendored
Normal file
31
.github/workflows/docs.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- '**.md'
|
||||
- '.github/workflows/docs.yml'
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- '**.md'
|
||||
- '.github/workflows/docs.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
markdown-lint:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Lint markdown files
|
||||
uses: DavidAnson/markdownlint-cli2-action@v18
|
||||
with:
|
||||
globs: |
|
||||
**/*.md
|
||||
!**/node_modules/**
|
||||
Loading…
Add table
Add a link
Reference in a new issue