Skip to content

Commit eb653ed

Browse files
Merge branch 'main' into update
2 parents 8dc5d37 + 51f27f7 commit eb653ed

9 files changed

Lines changed: 107 additions & 19 deletions

.github/workflows/Build-Docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
7373
- name: Lint documentation
7474
id: super-linter
75-
uses: super-linter/super-linter/slim@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
75+
uses: super-linter/super-linter/slim@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
7676
env:
7777
RUN_LOCAL: true
7878
DEFAULT_BRANCH: main

.github/workflows/Get-Settings.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ on:
3232
description: The path to the root of the repo.
3333
required: false
3434
default: '.'
35+
ImportantFilePatterns:
36+
type: string
37+
description: |
38+
Newline-separated list of regex patterns that identify important files.
39+
Changes matching these patterns trigger build, test, and publish stages.
40+
When set, fully replaces the defaults (^src/ and ^README\.md$).
41+
required: false
42+
default: |
43+
^src/
44+
^README\.md$
3545
3646
outputs:
3747
Settings:
@@ -56,7 +66,7 @@ jobs:
5666
fetch-depth: 0
5767

5868
- name: Get-Settings
59-
uses: PSModule/Get-PSModuleSettings@21c88f499579f56a60cced37872089d866b94a66 # v1.4.4
69+
uses: PSModule/Get-PSModuleSettings@1e3d156786c56e6fbd839a1ba5ab21ff8858090e # v1.5.0
6070
id: Get-Settings
6171
with:
6272
SettingsPath: ${{ inputs.SettingsPath }}
@@ -65,3 +75,4 @@ jobs:
6575
Verbose: ${{ inputs.Verbose }}
6676
Version: ${{ inputs.Version }}
6777
WorkingDirectory: ${{ inputs.WorkingDirectory }}
78+
ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }}

.github/workflows/Lint-Repository.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
5050
- name: Lint code base
5151
id: super-linter
52-
uses: super-linter/super-linter@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
52+
uses: super-linter/super-linter@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
5353
env:
5454
GITHUB_TOKEN: ${{ github.token }}
5555
DEFAULT_WORKSPACE: ${{ fromJson(env.Settings).WorkingDirectory }}

.github/workflows/Linter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
fetch-depth: 0
2626

2727
- name: Lint code base
28-
uses: super-linter/super-linter@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
28+
uses: super-linter/super-linter@9e863354e3ff62e0727d37183162c4a88873df41 # v8.6.0
2929
env:
3030
GITHUB_TOKEN: ${{ github.token }}
3131
VALIDATE_BIOME_FORMAT: false
32+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
3233
VALIDATE_JSCPD: false
3334
VALIDATE_JSON_PRETTIER: false
3435
VALIDATE_MARKDOWN_PRETTIER: false

.github/workflows/Publish-Site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626

2727
- name: Deploy to GitHub Pages
2828
id: deployment
29-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
29+
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0

.github/workflows/Workflow-Test-Default.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Workflow-Test [Default]
22

3-
run-name: "Workflow-Test [Default] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
3+
run-name: 'Workflow-Test [Default] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}'
44

55
on:
66
workflow_dispatch:
77
pull_request:
8+
paths:
9+
- '.github/workflows/**'
10+
- '!.github/workflows/Release.yml'
11+
- '!.github/workflows/Linter.yml'
812
schedule:
913
- cron: '0 0 * * *'
1014

@@ -33,3 +37,7 @@ jobs:
3337
TEST_USER_PAT: ${{ secrets.TEST_USER_PAT }}
3438
with:
3539
WorkingDirectory: tests/srcTestRepo
40+
ImportantFilePatterns: |
41+
^src/
42+
^README\.md$
43+
^\.github/workflows/(?!Release\.yml$|Linter\.yml$)

.github/workflows/Workflow-Test-WithManifest.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: Workflow-Test [WithManifest]
22

3-
run-name: "Workflow-Test [WithManifest] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
3+
run-name: 'Workflow-Test [WithManifest] - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}'
44

55
on:
66
workflow_dispatch:
77
pull_request:
8+
paths:
9+
- '.github/workflows/**'
10+
- '!.github/workflows/Release.yml'
11+
- '!.github/workflows/Linter.yml'
812
schedule:
913
- cron: '0 0 * * *'
1014

@@ -33,3 +37,7 @@ jobs:
3337
TEST_USER_PAT: ${{ secrets.TEST_USER_PAT }}
3438
with:
3539
WorkingDirectory: tests/srcWithManifestTestRepo
40+
ImportantFilePatterns: |
41+
^src/
42+
^README\.md$
43+
^\.github/workflows/(?!Release\.yml$|Linter\.yml$)

.github/workflows/workflow.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ on:
5858
description: The path to the root of the repo.
5959
required: false
6060
default: '.'
61+
ImportantFilePatterns:
62+
type: string
63+
description: |
64+
Newline-separated list of regex patterns that identify important files.
65+
Changes matching these patterns trigger build, test, and publish stages.
66+
When set, fully replaces the defaults (^src/ and ^README\.md$).
67+
required: false
68+
default: |
69+
^src/
70+
^README\.md$
6171
6272
permissions:
6373
contents: write # to checkout the repo and create releases on the repo
@@ -81,6 +91,7 @@ jobs:
8191
Verbose: ${{ inputs.Verbose }}
8292
Version: ${{ inputs.Version }}
8393
WorkingDirectory: ${{ inputs.WorkingDirectory }}
94+
ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }}
8495

8596
# Runs on:
8697
# - ✅ Open/Updated PR - Lints code changes in active PRs

README.md

Lines changed: 61 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Depending on the labels in the pull requests, the [workflow will result in diffe
7575
- [Scenario Matrix](#scenario-matrix)
7676
- [Important file change detection](#important-file-change-detection)
7777
- [Files that trigger releases](#files-that-trigger-releases)
78-
- [Files that do NOT trigger releases](#files-that-do-not-trigger-releases)
78+
- [Customizing important file patterns](#customizing-important-file-patterns)
7979
- [Behavior when no important files are changed](#behavior-when-no-important-files-are-changed)
8080
- [Configuration](#configuration)
8181
- [Example 1 - Defaults with Code Coverage target](#example-1---defaults-with-code-coverage-target)
@@ -392,6 +392,7 @@ jobs:
392392
| `Version` | `string` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | `''` |
393393
| `Prerelease` | `boolean` | Whether to use a prerelease version of the 'GitHub' module. | `false` | `false` |
394394
| `WorkingDirectory` | `string` | The path to the root of the repo. | `false` | `'.'` |
395+
| `ImportantFilePatterns` | `string` | Newline-separated list of regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `false` | `^src/\n^README\.md$` |
395396

396397
### Secrets
397398

@@ -458,26 +459,69 @@ settings, or test files) are modified.
458459

459460
#### Files that trigger releases
460461

461-
| Path | Description |
462+
By default, the following regular expression patterns identify important files:
463+
464+
| Pattern | Description |
462465
| :--- | :---------- |
463-
| `src/**` | Module source code |
464-
| `README.md` | Module documentation |
466+
| `^src/` | Module source code |
467+
| `^README\.md$` | Module documentation |
468+
469+
#### Customizing important file patterns
470+
471+
To override the default patterns, set `ImportantFilePatterns` in your settings file (`.github/PSModule.yml`):
472+
473+
```yaml
474+
ImportantFilePatterns:
475+
- '^src/'
476+
- '^README\.md$'
477+
- '^examples/'
478+
```
465479

466-
#### Files that do NOT trigger releases
480+
When configured, the provided list fully replaces the defaults. Include the default patterns in your list if you still
481+
want them to trigger releases.
467482

468-
Changes to the following files will not trigger a release:
483+
To disable file-change triggering entirely (so that no file changes ever trigger a release), set an empty list in the
484+
settings file:
469485

470-
- `.github/workflows/*` - Workflow configurations
471-
- `.github/linters/*` - Linter configuration files
472-
- `tests/**` - Test files
473-
- `examples/**` - Example scripts
474-
- `.gitignore`, `.editorconfig`, etc. - Repository configuration files
486+
```yaml
487+
ImportantFilePatterns: []
488+
```
489+
490+
You can also pass patterns via the workflow input:
491+
492+
```yaml
493+
jobs:
494+
Process:
495+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
496+
with:
497+
ImportantFilePatterns: |
498+
^src/
499+
^README\.md$
500+
^examples/
501+
```
502+
503+
To disable triggering via the workflow input, pass an explicit empty string:
504+
505+
```yaml
506+
jobs:
507+
process:
508+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
509+
with:
510+
ImportantFilePatterns: ''
511+
```
512+
513+
Note that omitting the `ImportantFilePatterns` key entirely causes the workflow's default patterns (`^src/` and
514+
`^README\.md$`) to be used. The settings file takes priority over the workflow input, so set
515+
`ImportantFilePatterns: []` in `.github/PSModule.yml` to disable triggering regardless of the workflow input.
516+
517+
Resolution order: settings file → workflow input → workflow input default values.
475518

476519
#### Behavior when no important files are changed
477520

478521
When a pull request does not contain changes to important files:
479522

480-
1. A comment is automatically added to the PR explaining why build/test stages are skipped
523+
1. A comment is automatically added to the PR listing the configured patterns and explaining why build/test stages are
524+
skipped
481525
2. The `ReleaseType` output is set to `None`
482526
3. Build, test, and publish stages are skipped
483527
4. The PR can still be merged for non-release changes (documentation updates, CI improvements, etc.)
@@ -495,6 +539,7 @@ The following settings are available in the settings file:
495539
| Name | Type | Description | Default |
496540
| ----------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
497541
| `Name` | `String` | Name of the module to publish. Defaults to the repository name. | `null` |
542+
| `ImportantFilePatterns` | `Array` | Regular expression patterns that identify important files. Changes matching these patterns trigger build, test, and publish stages. When set, fully replaces the defaults. | `['^src/', '^README\.md$']` |
498543
| `Test.Skip` | `Boolean` | Skip all tests | `false` |
499544
| `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` |
500545
| `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` |
@@ -543,6 +588,10 @@ The following settings are available in the settings file:
543588
```yaml
544589
Name: null
545590
591+
ImportantFilePatterns:
592+
- '^src/'
593+
- '^README\.md$'
594+
546595
Build:
547596
Skip: false
548597
Module:

0 commit comments

Comments
 (0)