From 297818725f1a4dbb41857c8e0b47dfa266b2c90e Mon Sep 17 00:00:00 2001 From: James Date: Thu, 25 Jun 2026 21:36:19 -0400 Subject: [PATCH 1/2] i want to trigger an action --- 03-core-features/filters/included-file.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/03-core-features/filters/included-file.md b/03-core-features/filters/included-file.md index e69de29b..b9494426 100644 --- a/03-core-features/filters/included-file.md +++ b/03-core-features/filters/included-file.md @@ -0,0 +1,14 @@ +# Included File + +This file is used to demonstrate **path filters** in GitHub Actions workflows. + +Modifying this file will trigger workflows that include `filters/included-file.md` in their path filter, unlike `excluded-file.txt` which is ignored. + +## Example Usage + +```yaml +on: + push: + paths: + - 'filters/**.md' +``` From f66570645b417f093ceeea4713570dbe71479c57 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 25 Jun 2026 21:38:15 -0400 Subject: [PATCH 2/2] adding content --- 03-core-features/filters/included-file.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/03-core-features/filters/included-file.md b/03-core-features/filters/included-file.md index b9494426..65b8f9e8 100644 --- a/03-core-features/filters/included-file.md +++ b/03-core-features/filters/included-file.md @@ -12,3 +12,26 @@ on: paths: - 'filters/**.md' ``` + +## How Path Filters Work + +GitHub Actions supports two path filter keys: + +- **`paths`** — triggers the workflow when a matching file is changed. +- **`paths-ignore`** — skips the workflow when only matching files are changed. + +You can also use negation patterns to fine-tune behavior: + +```yaml +on: + push: + paths: + - '**.md' + - '!**/excluded-file.txt' +``` + +## Notes + +- Glob patterns follow the same syntax as `.gitignore`. +- At least one changed file must match for the workflow to trigger. +- `paths` and `paths-ignore` cannot be used together in the same event trigger.