Commit 6dfddf4
authored
🩹 [Patch]: Actions are internalized and automatically follow the workflow version (#385)
When you reference Process-PSModule at a release tag, run it from a
branch during development, or test it from a fork, the actions it calls
now automatically match that same version. There's no more keeping a
workflow and its actions in sync by hand — pin the workflow, and the
actions follow.
- Fixes #384
## New: Actions automatically follow the workflow version in use
Every stage workflow now checks out its own source at the exact commit
it is running from, then calls its actions from that local copy instead
of a separately pinned action reference. In practice this means:
- Reference a release tag → you get that tag's actions.
- Run a development branch → the branch's actions run together with it,
with no separate action release or pin update needed to test a change.
- Fork the repository → your fork's actions are used, not upstream's.
This is possible using `job.workflow_repository` and `job.workflow_sha`,
a set of GitHub Actions context properties that let a reusable workflow
discover its own source repository and commit. This capability did not
exist before — it was introduced by GitHub in April 2026 (shipped in
[Actions Runner
v2.334.0](https://github.com/actions/runner/releases/tag/v2.334.0), see
[actions/runner#4335](actions/runner#4335)) and
is documented in the [`job` context
reference](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#job-context).
No official GitHub changelog announcement could be found for this change
— the runner release and context documentation are the primary
references.
`GitHub-Script`, `Invoke-Pester`, and `Invoke-ScriptAnalyzer` continue
to be consumed from their own repositories at pinned commits, as before.
No changes are required to consumer workflows. Inputs, outputs, and
secrets are unchanged.
## Changed: Internalized actions have moved out of their standalone
repositories
`Build-PSModule`, `Document-PSModule`, `Get-PSModuleSettings`,
`Get-PesterCodeCoverage`, `Get-PesterTestResults`,
`Initialize-PSModule`, `Install-PSModuleHelpers`, `Publish-PSModule`,
`Resolve-PSModuleVersion`, and `Test-PSModule` now ship directly inside
Process-PSModule instead of living in their own PSModule repositories.
Those standalone repositories are now archived and will be deleted soon.
If you reference any of them directly, switch to Process-PSModule
instead. The old actions will also be the ones older versions of
Process-PSModule will use, so be sure to update to be able to use the
framework.
## Technical Details
- Ten composite actions are now bundled under `.github/actions/`:
`Build-PSModule`, `Document-PSModule`, `Get-PSModuleSettings`,
`Get-PesterCodeCoverage`, `Get-PesterTestResults`,
`Initialize-PSModule`, `Install-PSModuleHelpers`, `Publish-PSModule`,
`Resolve-PSModuleVersion`, `Test-PSModule`.
- All stage workflows add a self-checkout step before any action call:
`repository: ${{ job.workflow_repository }}`, `ref: ${{ job.workflow_sha
}}`, `path: _wf`.
- Action call sites change from `PSModule/<Name>@<sha>` to
`./_wf/.github/actions/<Name>`.
- Nested dependencies on `Install-PSModuleHelpers` resolve from the same
bundled revision.
- `.github/actionlint.yaml` is updated to recognize the self-checkout
pattern and the `job.workflow_*` properties.
- Action READMEs and test-suite consolidation are out of scope for this
change.
**Validation**
- [MariusTestModule SHA-pinned consumer
run](https://github.com/MariusStorhaug/MariusTestModule/actions/runs/29379826692)
passed.
- [MariusTestModule ref-based consumer
run](https://github.com/MariusStorhaug/MariusTestModule/actions/runs/29380061013)
passed and resolved `feat/internalize-process-actions` to the invoked
workflow commit.1 parent 3211236 commit 6dfddf4
294 files changed
Lines changed: 17212 additions & 396 deletions
File tree
- .github
- actions
- Build-PSModule
- src
- helpers
- Build
- tests
- srcMinimalTestRepo/src/functions/public
- srcTestRepo/src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- srcWithManifestTestRepo/src
- assemblies
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tools
- Document-PSModule
- src
- helpers
- tests/srcTestRepo
- outputs/module/PSModuleTest
- assemblies
- data
- formats
- modules
- scripts
- types
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- Widgets
- init
- modules
- scripts
- types
- variables
- private
- public
- Get-PSModuleSettings
- src
- tests
- scenarios
- invalid-percent-target
- valid
- Get-PesterCodeCoverage
- src
- tests/CodeCoverage
- Environments-Windows-CodeCoverage
- Environments-macOS-CodeCoverage
- Module-Windows-CodeCoverage
- Module-macOS-CodeCoverage
- MyTests-Windows-CodeCoverage
- MyTests-macOS-CodeCoverage
- Get-PesterTestResults
- src
- tests/TestResults
- PATH-Windows-TestResults
- PSModuleLint-Module-Windows-TestResults
- PSModuleLint-SourceCode-Windows-TestResults
- PSModuleTest-Module-Windows-TestResults
- PSModuleTest-SourceCode-Windows-TestResults
- Initialize-PSModule
- src
- Install-PSModuleHelpers
- src
- Helpers
- tests
- Publish-PSModule
- src
- tests/outputs
- module-prerelease/PSModuleTest
- module-unstamped/PSModuleTest
- module/PSModuleTest
- assemblies
- data
- formats
- modules
- scripts
- types
- Resolve-PSModuleVersion
- src
- tests
- Test-PSModule
- src
- tests
- Module
- PSModule
- SourceCode
- PSModule
- tests
- outputEnumOnlyTestRepo
- outputs/module/PSModuleEnumOnly
- tests
- outputTestRepo
- outputs
- docs/PSModuleTest
- module/PSModuleTest
- assemblies
- data
- formats
- modules
- scripts
- types
- tests
- Environments
- MyTests
- srcTestRepo
- icon
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tests
- srcWithManifestTestRepo
- icon
- src
- assemblies
- classes
- private
- public
- data
- formats
- functions
- private
- public
- PSModule
- SomethingElse
- init
- modules
- scripts
- types
- variables
- private
- public
- tests
- Environments
- MyTests
- tools
- linters
- workflows
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 60 additions & 0 deletions
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Lines changed: 66 additions & 0 deletions
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
Lines changed: 47 additions & 0 deletions
| 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 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments