Commit 1fcb663
authored
🩹[Patch]: Workflow improvements (#55)
This pull request introduces several significant improvements to the
GitHub Actions workflows, action implementation, and supporting test
infrastructure. The most important changes include a complete overhaul
of the release automation, enhancements to the action's prescript
functionality, updates to workflow dependencies for improved security
and reproducibility, and expanded test scripts for better validation and
maintainability.
**Workflow and Release Automation Updates:**
* Replaces `.github/workflows/Auto-Release.yml` and
`.github/release.yml` with a new `.github/workflows/Release.yml`
workflow that is more targeted, triggers only on relevant changes, and
uses a pinned version of the `PSModule/Release-GHRepository` action for
deterministic releases.
* Changes Dependabot update schedule from weekly to daily and introduces
a cooldown period, improving dependency management responsiveness.
**Action Implementation and Security:**
* Refactors the action's execution logic to move prescript execution
into a dedicated `src/prescript.ps1` script, which safely handles both
inline scripts and file paths. Updates references in `action.yml` to use
this new script and pins all GitHub Actions to specific commit SHAs for
security and reproducibility.
**Linter and Workflow Improvements:**
* Updates linter workflow to use pinned versions of `actions/checkout`
and `super-linter/super-linter`, disables certain validations for
performance, and removes the `.github/linters/.jscpd.json` configuration
file as duplicate code checks are now disabled.
* Adds an exclusion for the `PSAvoidUsingWriteHost` rule in PowerShell
Script Analyzer configuration, reflecting intentional usage for GitHub
Actions output.
**Documentation and Test Infrastructure:**
* Enhances the `README.md` documentation for action inputs and outputs,
improving formatting and clarity for users.
* Adds new PowerShell test scripts (`tests/Prescript.ps1`,
`tests/Show-Status.ps1`, `tests/Test-ActionResults.ps1`) to validate
prescript execution, action status reporting, and aggregate test results
with summary reporting. Updates test configuration to explicitly set
code coverage paths.
---
**Detailed list of most important changes:**
**1. Workflow and Release Automation**
- Replaces legacy auto-release workflows with a new, more secure and
targeted `Release.yml` workflow, using pinned action versions and
triggering only on relevant file changes.
- Dependabot now checks for updates daily with a 7-day cooldown,
improving dependency freshness.
**2. Action Implementation and Security**
- Moves prescript execution to a new `src/prescript.ps1` script that
safely handles both inline and file-based scripts, and updates
`action.yml` to use this script.
- Pins all third-party GitHub Actions in workflows and action
implementation to specific commit SHAs for enhanced security and
reproducibility.
**3. Linter and Workflow Improvements**
- Updates linter workflow to use pinned versions and disables duplicate
code checks and certain validations for performance; removes
`.jscpd.json` as it is no longer needed.
- Excludes `PSAvoidUsingWriteHost` in PowerShell linting to accommodate
intentional usage in GitHub Actions.
**4. Documentation and Test Infrastructure**
- Improves documentation for action inputs and outputs in `README.md`,
providing clearer descriptions and formatting.
- Adds new test scripts for prescript validation, action status display,
and aggregate action results, and updates test configuration for code
coverage.1 parent 882994c commit 1fcb663
19 files changed
Lines changed: 470 additions & 464 deletions
File tree
- .github
- linters
- workflows
- src
- tests
- 2-Standard
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
This file was deleted.
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | | - | |
| 362 | + | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
| 366 | + | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
| |||
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
374 | | - | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
401 | | - | |
| 402 | + | |
0 commit comments