Skip to content

Commit 44008be

Browse files
🩹 [Patch]: Align GitHub-Script params + nightly runs (#67)
## Description This pull request includes significant updates to the GitHub Actions workflows, primarily focusing on adding new input parameters and enabling scheduled workflows. The most important changes include the addition of `Debug`, `Verbose`, and `Prerelease` parameters, and the introduction of scheduled workflows. ### Workflow Enhancements: * `.github/workflows/Workflow-Test-Default-CI.yml`, `.github/workflows/Workflow-Test-Default.yml`, `.github/workflows/Workflow-Test-WithManifest-CI.yml`, `.github/workflows/Workflow-Test-WithManifest.yml`: Added `workflow_dispatch` and `schedule` triggers to enable manual and scheduled runs. [[1]](diffhunk://#diff-10312b20130a169afdec1431c92296a6af48efafb8fc75d3d5275d45b4fda694L5-R9) [[2]](diffhunk://#diff-730ab31e16ecd77c274ffd11fc68532e85da88b273ad10b6f0eb7f847b363a67L5-R9) [[3]](diffhunk://#diff-0730466e06958cfe3cd7506a98634e4732471d39f06d1c6764d0b865a0841826L5-R9) [[4]](diffhunk://#diff-986f488468fc186b6b776c101acadf3170ae87e52e734c245cdc794054ca87d8L5-R9) ### Parameter Updates on reusable workflows: * [`.github/workflows/CI.yml`](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L51-R74): Added `Debug`, `Verbose`, and `Prerelease` parameters to various jobs. These parameters allow for more detailed logging and the use of prerelease versions of the GitHub module. [[1]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L51-R74) [[2]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L100-R103) [[3]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L110-R115) [[4]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L126-R133) [[5]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L136-R145) [[6]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L152-R163) [[7]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L162-R175) [[8]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L180-R195) [[9]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R204-R207) [[10]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L207-R227) [[11]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L224-R246) [[12]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L251-R275) [[13]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L268-R294) [[14]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L295-R323) [[15]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L312-R342) [[16]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L340-R372) [[17]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R383-R386) [[18]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8L494-R532) [[19]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R556-R559) [[20]](diffhunk://#diff-3ab46ee209a127470fce3c2cf106b1a1dbadbb929a4b5b13656a4bc4ce19c0b8R616-R619) * [`.github/workflows/workflow.yml`](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L56-R79): Added `Debug`, `Verbose`, and `Prerelease` parameters to various jobs, similar to the changes in `CI.yml`. These parameters enhance the flexibility and debugging capabilities of the workflows. [[1]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L56-R79) [[2]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L107-R110) [[3]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L117-R122) [[4]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L133-R140) [[5]](diffhunk://#diff-126bf89616b7daa3d14ebc882ad18666aaf1c3dae888c4ba306a66ec80758bc1L143-R152) ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent b84be00 commit 44008be

File tree

7 files changed

+193
-91
lines changed

7 files changed

+193
-91
lines changed

.github/workflows/CI.yml

Lines changed: 82 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,30 @@ on:
4848
description: Defines what types of tests to skip. Allowed values are 'All', 'SourceCode', 'Module', 'None', 'macOS', 'Windows', 'Linux'.
4949
required: false
5050
default: None
51-
Version:
52-
type: string
53-
description: The version of the 'GitHub' module to use. Defaults to latest version.
51+
PublishDocs:
52+
type: boolean
53+
description: Whether to publish the documentation using MkDocs and GitHub Pages.
5454
required: false
55-
Prerelease:
55+
default: true
56+
Debug:
5657
type: boolean
57-
description: Whether to use a prerelease version of the 'GitHub' module.
58+
description: Enable debug output.
5859
required: false
5960
default: false
60-
PublishDocs:
61+
Verbose:
6162
type: boolean
62-
description: Whether to publish the documentation using MkDocs and GitHub Pages.
63+
description: Enable verbose output.
6364
required: false
64-
default: true
65-
VerbosePreference:
65+
default: false
66+
Version:
6667
type: string
67-
description: "The preference for verbose output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'."
68+
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
6869
required: false
69-
default: 'SilentlyContinue'
70-
DebugPreference:
71-
type: string
72-
description: "The preference for debug output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'."
70+
Prerelease:
71+
type: boolean
72+
description: Whether to use a prerelease version of the 'GitHub' module.
7373
required: false
74-
default: 'SilentlyContinue'
74+
default: false
7575

7676
env:
7777
GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication
@@ -97,8 +97,10 @@ jobs:
9797
- name: Initialize environment
9898
uses: PSModule/Initialize-PSModule@v1
9999
with:
100-
Version: ${{ inputs.Version }}
100+
Debug: ${{ inputs.Debug }}
101101
Prerelease: ${{ inputs.Prerelease }}
102+
Verbose: ${{ inputs.Verbose }}
103+
Version: ${{ inputs.Version }}
102104

103105
- name: Test source code
104106
id: test
@@ -107,24 +109,26 @@ jobs:
107109
Name: ${{ inputs.Name }}
108110
Path: ${{ inputs.Path }}
109111
TestType: SourceCode
110-
VerbosePreference: ${{ inputs.VerbosePreference }}
111-
DebugPreference: ${{ inputs.DebugPreference }}
112+
Debug: ${{ inputs.Debug }}
113+
Prerelease: ${{ inputs.Prerelease }}
114+
Verbose: ${{ inputs.Verbose }}
115+
Version: ${{ inputs.Version }}
112116

113117
TestSourceCode-pwsh-macos-latest:
114118
name: Test source code (pwsh, macos-latest)
115119
if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'macOS')) }}
116120
runs-on: macos-latest
117-
outputs:
118-
passed: ${{ steps.test.outputs.passed }}
119121
steps:
120122
- name: Checkout Code
121123
uses: actions/checkout@v4
122124

123125
- name: Initialize environment
124126
uses: PSModule/Initialize-PSModule@v1
125127
with:
126-
Version: ${{ inputs.Version }}
128+
Debug: ${{ inputs.Debug }}
127129
Prerelease: ${{ inputs.Prerelease }}
130+
Verbose: ${{ inputs.Verbose }}
131+
Version: ${{ inputs.Version }}
128132

129133
- name: Test source code
130134
id: test
@@ -133,24 +137,26 @@ jobs:
133137
Name: ${{ inputs.Name }}
134138
Path: ${{ inputs.Path }}
135139
TestType: SourceCode
136-
VerbosePreference: ${{ inputs.VerbosePreference }}
137-
DebugPreference: ${{ inputs.DebugPreference }}
140+
Debug: ${{ inputs.Debug }}
141+
Prerelease: ${{ inputs.Prerelease }}
142+
Verbose: ${{ inputs.Verbose }}
143+
Version: ${{ inputs.Version }}
138144

139145
TestSourceCode-pwsh-windows-latest:
140146
name: Test source code (pwsh, windows-latest)
141147
if: ${{ !(contains(inputs.SkipTests, 'All' ) || contains(inputs.SkipTests, 'SourceCode' ) || contains(inputs.SkipTests, 'Windows')) }}
142148
runs-on: windows-latest
143-
outputs:
144-
passed: ${{ steps.test.outputs.passed }}
145149
steps:
146150
- name: Checkout Code
147151
uses: actions/checkout@v4
148152

149153
- name: Initialize environment
150154
uses: PSModule/Initialize-PSModule@v1
151155
with:
152-
Version: ${{ inputs.Version }}
156+
Debug: ${{ inputs.Debug }}
153157
Prerelease: ${{ inputs.Prerelease }}
158+
Verbose: ${{ inputs.Verbose }}
159+
Version: ${{ inputs.Version }}
154160

155161
- name: Test source code
156162
id: test
@@ -159,8 +165,10 @@ jobs:
159165
Name: ${{ inputs.Name }}
160166
Path: ${{ inputs.Path }}
161167
TestType: SourceCode
162-
VerbosePreference: ${{ inputs.VerbosePreference }}
163-
DebugPreference: ${{ inputs.DebugPreference }}
168+
Debug: ${{ inputs.Debug }}
169+
Prerelease: ${{ inputs.Prerelease }}
170+
Verbose: ${{ inputs.Verbose }}
171+
Version: ${{ inputs.Version }}
164172

165173
BuildModule:
166174
name: Build module
@@ -177,9 +185,10 @@ jobs:
177185
- name: Initialize environment
178186
uses: PSModule/Initialize-PSModule@v1
179187
with:
180-
Verbose: true
181-
Version: ${{ inputs.Version }}
188+
Debug: ${{ inputs.Debug }}
182189
Prerelease: ${{ inputs.Prerelease }}
190+
Verbose: ${{ inputs.Verbose }}
191+
Version: ${{ inputs.Version }}
183192

184193
- name: Build module
185194
uses: PSModule/Build-PSModule@v2
@@ -188,6 +197,10 @@ jobs:
188197
Path: ${{ inputs.Path }}
189198
ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
190199
DocsOutputPath: ${{ inputs.DocsOutputPath }}
200+
Debug: ${{ inputs.Debug }}
201+
Prerelease: ${{ inputs.Prerelease }}
202+
Verbose: ${{ inputs.Verbose }}
203+
Version: ${{ inputs.Version }}
191204

192205
# This is necessary as there is no way to get output from a matrix job
193206
TestModule-pwsh-ubuntu-latest:
@@ -204,8 +217,10 @@ jobs:
204217
- name: Initialize environment
205218
uses: PSModule/Initialize-PSModule@v1
206219
with:
207-
Version: ${{ inputs.Version }}
220+
Debug: ${{ inputs.Debug }}
208221
Prerelease: ${{ inputs.Prerelease }}
222+
Verbose: ${{ inputs.Verbose }}
223+
Version: ${{ inputs.Version }}
209224

210225
- name: Download module artifact
211226
uses: actions/download-artifact@v4
@@ -221,8 +236,10 @@ jobs:
221236
Name: ${{ inputs.Name }}
222237
Path: ${{ inputs.ModulesOutputPath }}
223238
TestType: Module
224-
VerbosePreference: ${{ inputs.VerbosePreference }}
225-
DebugPreference: ${{ inputs.DebugPreference }}
239+
Debug: ${{ inputs.Debug }}
240+
Prerelease: ${{ inputs.Prerelease }}
241+
Verbose: ${{ inputs.Verbose }}
242+
Version: ${{ inputs.Version }}
226243

227244
- name: Status
228245
shell: pwsh
@@ -248,8 +265,10 @@ jobs:
248265
- name: Initialize environment
249266
uses: PSModule/Initialize-PSModule@v1
250267
with:
251-
Version: ${{ inputs.Version }}
268+
Debug: ${{ inputs.Debug }}
252269
Prerelease: ${{ inputs.Prerelease }}
270+
Verbose: ${{ inputs.Verbose }}
271+
Version: ${{ inputs.Version }}
253272

254273
- name: Download module artifact
255274
uses: actions/download-artifact@v4
@@ -265,8 +284,10 @@ jobs:
265284
Name: ${{ inputs.Name }}
266285
Path: ${{ inputs.ModulesOutputPath }}
267286
TestType: Module
268-
VerbosePreference: ${{ inputs.VerbosePreference }}
269-
DebugPreference: ${{ inputs.DebugPreference }}
287+
Debug: ${{ inputs.Debug }}
288+
Prerelease: ${{ inputs.Prerelease }}
289+
Verbose: ${{ inputs.Verbose }}
290+
Version: ${{ inputs.Version }}
270291

271292
- name: Status
272293
shell: pwsh
@@ -292,8 +313,10 @@ jobs:
292313
- name: Initialize environment
293314
uses: PSModule/Initialize-PSModule@v1
294315
with:
295-
Version: ${{ inputs.Version }}
316+
Debug: ${{ inputs.Debug }}
296317
Prerelease: ${{ inputs.Prerelease }}
318+
Verbose: ${{ inputs.Verbose }}
319+
Version: ${{ inputs.Version }}
297320

298321
- name: Download module artifact
299322
uses: actions/download-artifact@v4
@@ -309,8 +332,10 @@ jobs:
309332
Name: ${{ inputs.Name }}
310333
Path: ${{ inputs.ModulesOutputPath }}
311334
TestType: Module
312-
VerbosePreference: ${{ inputs.VerbosePreference }}
313-
DebugPreference: ${{ inputs.DebugPreference }}
335+
Debug: ${{ inputs.Debug }}
336+
Prerelease: ${{ inputs.Prerelease }}
337+
Verbose: ${{ inputs.Verbose }}
338+
Version: ${{ inputs.Version }}
314339

315340
- name: Status
316341
shell: pwsh
@@ -337,8 +362,10 @@ jobs:
337362
- name: Initialize environment
338363
uses: PSModule/Initialize-PSModule@v1
339364
with:
340-
Version: ${{ inputs.Version }}
365+
Debug: ${{ inputs.Debug }}
341366
Prerelease: ${{ inputs.Prerelease }}
367+
Verbose: ${{ inputs.Verbose }}
368+
Version: ${{ inputs.Version }}
342369

343370
- name: Download module artifact
344371
uses: actions/download-artifact@v4
@@ -349,6 +376,10 @@ jobs:
349376
- name: Summerize tests
350377
uses: PSModule/GitHub-Script@v1
351378
with:
379+
Debug: ${{ inputs.Debug }}
380+
Prerelease: ${{ inputs.Prerelease }}
381+
Verbose: ${{ inputs.Verbose }}
382+
Version: ${{ inputs.Version }}
352383
Script: |
353384
LogGroup -Name 'Test analysis' {
354385
@@ -491,8 +522,10 @@ jobs:
491522
- name: Initialize environment
492523
uses: PSModule/Initialize-PSModule@v1
493524
with:
494-
Version: ${{ inputs.Version }}
525+
Debug: ${{ inputs.Debug }}
495526
Prerelease: ${{ inputs.Prerelease }}
527+
Verbose: ${{ inputs.Verbose }}
528+
Version: ${{ inputs.Version }}
496529

497530
- name: Download docs artifact
498531
uses: actions/download-artifact@v4
@@ -516,6 +549,10 @@ jobs:
516549
- name: Structure site
517550
uses: PSModule/GitHub-Script@v1
518551
with:
552+
Debug: ${{ inputs.Debug }}
553+
Prerelease: ${{ inputs.Prerelease }}
554+
Verbose: ${{ inputs.Verbose }}
555+
Version: ${{ inputs.Version }}
519556
Script: |
520557
$moduleName = [string]::IsNullOrEmpty('${{ inputs.Name }}') ? $env:GITHUB_REPOSITORY_NAME : '${{ inputs.Name }}'
521558
$ModuleSourcePath = Join-Path $PWD -ChildPath '${{ inputs.Path }}'
@@ -572,6 +609,10 @@ jobs:
572609
uses: PSModule/GitHub-Script@v1
573610
with:
574611
WorkingDirectory: ${{ inputs.SiteOutputPath }}
612+
Debug: ${{ inputs.Debug }}
613+
Prerelease: ${{ inputs.Prerelease }}
614+
Verbose: ${{ inputs.Verbose }}
615+
Version: ${{ inputs.Version }}
575616
Script: |
576617
LogGroup 'Build docs - mkdocs build - content' {
577618
Show-FileContent -Path mkdocs.yml

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Workflow-Test CI [Default]
22

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

5-
on: [pull_request]
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
610

711
concurrency:
812
group: ${{ github.workflow }}-${{ github.ref }}

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

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

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

5-
on: [pull_request]
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
610

711
concurrency:
812
group: ${{ github.workflow }}-${{ github.ref }}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Workflow-Test CI [WithManifest]
22

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

5-
on: [pull_request]
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
610

711
concurrency:
812
group: ${{ github.workflow }}-${{ github.ref }}

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

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

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

5-
on: [pull_request]
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
schedule:
9+
- cron: '0 0 * * *'
610

711
concurrency:
812
group: ${{ github.workflow }}-${{ github.ref }}

0 commit comments

Comments
 (0)