Skip to content

Commit 5e8c7ff

Browse files
Normalize action run blocks
Replace remaining multiline run blocks in internal action.yml files with single-line invocations or commands, keeping executable logic in src scripts for better tooling and lint support. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 214dfb3 commit 5e8c7ff

8 files changed

Lines changed: 9 additions & 24 deletions

File tree

.github/actions/Build-PSModule/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ runs:
4040
PSMODULE_BUILD_PSMODULE_INPUT_OutputFolder: ${{ inputs.OutputFolder }}
4141
PSMODULE_BUILD_PSMODULE_INPUT_Version: ${{ inputs.Version }}
4242
PSMODULE_BUILD_PSMODULE_INPUT_Prerelease: ${{ inputs.Prerelease }}
43-
run: |
44-
# Build-PSModule
45-
${{ github.action_path }}/src/main.ps1
43+
run: ${{ github.action_path }}/src/main.ps1
4644

4745
- name: Upload module artifact
4846
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

.github/actions/Cleanup-PSModulePrereleases/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ runs:
2929
env:
3030
PSMODULE_CLEANUP_PSMODULEPRERELEASES_INPUT_WhatIf: ${{ inputs.WhatIf }}
3131
PSMODULE_CLEANUP_PSMODULEPRERELEASES_CONTEXT_ReleaseTag: ${{ env.PSMODULE_PUBLISH_PSMODULE_CONTEXT_ReleaseTag }}
32-
run: |
33-
# Cleanup prerelease tags
34-
${{ github.action_path }}/src/cleanup.ps1
32+
run: ${{ github.action_path }}/src/cleanup.ps1

.github/actions/Document-PSModule/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,4 @@ runs:
2727
DOCUMENT_PSMODULE_INPUT_Name: ${{ inputs.Name }}
2828
DOCUMENT_PSMODULE_INPUT_ShowSummaryOnSuccess: ${{ inputs.ShowSummaryOnSuccess }}
2929
working-directory: ${{ inputs.WorkingDirectory }}
30-
run: |
31-
# Build-PSModuleDocumentation
32-
${{ github.action_path }}/src/main.ps1
30+
run: ${{ github.action_path }}/src/main.ps1

.github/actions/Expose-TestData/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ runs:
2020
shell: pwsh
2121
env:
2222
PSMODULE_TEST_DATA: ${{ inputs.TestData }}
23-
run: |
24-
Import-TestData
23+
run: Import-TestData

.github/actions/Install-PSModule/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ runs:
66
steps:
77
- name: Install-PSModule
88
shell: pwsh
9-
run: |
10-
# Install-PSModule
11-
${{ github.action_path }}/src/main.ps1
9+
run: ${{ github.action_path }}/src/main.ps1

.github/actions/Publish-PSModule/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ runs:
4646

4747
- name: Update Microsoft.PowerShell.PSResourceGet
4848
shell: pwsh
49-
run: |
50-
Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository
49+
run: Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository
5150

5251
- name: Download module artifact
5352
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

.github/actions/Resolve-PSModuleVersion/action.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ runs:
5858

5959
- name: Install PSSemVer
6060
shell: pwsh
61-
run: |
62-
Install-PSResource -Name PSSemVer -Repository PSGallery -TrustRepository
61+
run: Install-PSResource -Name PSSemVer -Repository PSGallery -TrustRepository
6362

6463
- name: Resolve module version
6564
id: resolve
@@ -71,6 +70,4 @@ runs:
7170
PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_Name: ${{ inputs.Name }}
7271
PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_EventJson: ${{ inputs.EventJson }}
7372
GITHUB_EVENT_PATH: ${{ inputs.EventPath || github.event_path }}
74-
run: |
75-
# Resolve module version
76-
${{ github.action_path }}/src/main.ps1
73+
run: ${{ github.action_path }}/src/main.ps1

.github/actions/Test-PSModule/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,7 @@ runs:
276276
env:
277277
PSMODULE_TEST_PSMODULE_INPUT_Name: ${{ inputs.Name }}
278278
PSMODULE_TEST_PSMODULE_INPUT_Settings: ${{ inputs.Settings }}
279-
run: |
280-
# Get test paths
281-
${{ github.action_path }}/src/main.ps1
279+
run: ${{ github.action_path }}/src/main.ps1
282280

283281
- name: Invoke-Pester
284282
uses: PSModule/Invoke-Pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0

0 commit comments

Comments
 (0)