Skip to content
Merged
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
23 changes: 15 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,28 @@ name: Validate Neovim Config

on:
push:
branches: ["**"]
# Documentation branches only ever carry docs changes — never build them.
branches-ignore:
- "docs/**"
pull_request:
branches: [main]

jobs:
validate:
name: Build & validate Neovim
runs-on: ubuntu-latest
# Skip docs: and chore: commits on push; always run on pull requests
if: |
github.event_name == 'pull_request' ||
(
!startsWith(github.event.head_commit.message, 'docs:') &&
!startsWith(github.event.head_commit.message, 'chore:')
)
# Do not run for documentation-only work:
# - PRs opened from a docs/* branch (github.head_ref)
# - pushes whose tip commit is a docs:/chore: (or scoped) commit
# On pull_request events head_commit is null, so only the head_ref check
# applies there; on push events head_ref is empty, so only the message
# checks apply. Pushes to docs/** never reach here (filtered by on.push).
if: >-
!startsWith(github.head_ref, 'docs/') &&
!startsWith(github.event.head_commit.message, 'docs:') &&
!startsWith(github.event.head_commit.message, 'docs(') &&
!startsWith(github.event.head_commit.message, 'chore:') &&
!startsWith(github.event.head_commit.message, 'chore(')

steps:
- name: Checkout
Expand Down
Loading