You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means the Process-PSModule repository itself never actually publishes — it always runs in WhatIf mode. However, the mechanism is a magic string that cannot be overridden, is invisible to consumers, and would silently break if the repository were forked, transferred, or renamed.
Request
Current experience
The WhatIf input on the Publish-PSModule action is set by comparing github.repository against the literal string 'PSModule/Process-PSModule'. There is no way for a workflow caller to explicitly request dry-run mode or to override this behavior.
Desired experience
A DryRun (or WhatIf) boolean input on workflow.yml allows any caller to opt into dry-run mode explicitly. The hard-coded repository comparison is removed. The Process-PSModule repository's own caller workflow sets DryRun: true in its invocation.
Acceptance criteria
No hard-coded repository name in any workflow file
Callers can set dry-run mode via an explicit input
Process-PSModule's own test workflows still run in dry-run mode
Default behavior for callers who do not set the input is false (publish normally)
Note
This violates Twelve-Factor App Factor III (Config) — environment-specific behavior should be driven by configuration, not code. It also violates Clean Code principles: magic strings that encode business logic are fragile and opaque.
Technical decisions
Approach: Add a DryRun boolean input (default: false) to workflow.yml. Pass it through to Publish-Module.yml as WhatIf: ${{ inputs.DryRun }}. Remove the github.repository == 'PSModule/Process-PSModule' comparison entirely.
Naming: Use DryRun rather than WhatIf at the workflow level — WhatIf is PowerShell-specific terminology that may confuse GitHub Actions users. The underlying action already accepts WhatIf, so the mapping is DryRun → WhatIf.
Process-PSModule test workflows: The Workflow-Test-Default.yml and Workflow-Test-WithManifest.yml (or whichever workflow calls workflow.yml from within this repo) should pass DryRun: true explicitly.
Implementation plan
workflow.yml changes
Add DryRun boolean input with default: false and description
Publish-Module.yml(line 40) contains a hard-coded repository name to enable dry-run mode:This means the Process-PSModule repository itself never actually publishes — it always runs in WhatIf mode. However, the mechanism is a magic string that cannot be overridden, is invisible to consumers, and would silently break if the repository were forked, transferred, or renamed.
Request
Current experience
The
WhatIfinput on thePublish-PSModuleaction is set by comparinggithub.repositoryagainst the literal string'PSModule/Process-PSModule'. There is no way for a workflow caller to explicitly request dry-run mode or to override this behavior.Desired experience
A
DryRun(orWhatIf) boolean input onworkflow.ymlallows any caller to opt into dry-run mode explicitly. The hard-coded repository comparison is removed. The Process-PSModule repository's own caller workflow setsDryRun: truein its invocation.Acceptance criteria
false(publish normally)Note
This violates Twelve-Factor App Factor III (Config) — environment-specific behavior should be driven by configuration, not code. It also violates Clean Code principles: magic strings that encode business logic are fragile and opaque.
Technical decisions
Approach: Add a
DryRunboolean input (default:false) toworkflow.yml. Pass it through toPublish-Module.ymlasWhatIf: ${{ inputs.DryRun }}. Remove thegithub.repository == 'PSModule/Process-PSModule'comparison entirely.Naming: Use
DryRunrather thanWhatIfat the workflow level —WhatIfis PowerShell-specific terminology that may confuse GitHub Actions users. The underlying action already acceptsWhatIf, so the mapping isDryRun→WhatIf.Process-PSModule test workflows: The
Workflow-Test-Default.ymlandWorkflow-Test-WithManifest.yml(or whichever workflow callsworkflow.ymlfrom within this repo) should passDryRun: trueexplicitly.Implementation plan
workflow.yml changes
DryRunboolean input withdefault: falseand descriptionDryRuntoPublish-Modulejob as a new inputPublish-Module.yml changes
DryRuninput toworkflow_callinputsWhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }}withWhatIf: ${{ inputs.DryRun }}Test workflow changes
Workflow-Test-Default.ymlto passDryRun: trueWorkflow-Test-WithManifest.ymlto passDryRun: trueTesting
DryRunpublishes normallyDryRun: true