Skip to content

Commit 3edbe44

Browse files
Harden composite action input handling
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent a69daa5 commit 3edbe44

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ runs:
1111
steps:
1212
- name: Build documentation site
1313
shell: pwsh
14-
run: '& "${{ github.action_path }}/src/main.ps1" -WorkingDirectory "${{ inputs.WorkingDirectory }}"'
14+
env:
15+
INPUT_WORKING_DIRECTORY: ${{ inputs.WorkingDirectory }}
16+
run: '& "${{ github.action_path }}/src/main.ps1" -WorkingDirectory "$env:INPUT_WORKING_DIRECTORY"'

.github/actions/Inject-SiteScripts/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ runs:
1515
steps:
1616
- name: Inject site scripts
1717
shell: pwsh
18-
run: '& "${{ github.action_path }}/src/main.ps1" -SitePath "${{ inputs.SitePath }}" -WorkflowPath "${{ inputs.WorkflowPath }}"'
18+
env:
19+
INPUT_SITE_PATH: ${{ inputs.SitePath }}
20+
INPUT_WORKFLOW_PATH: ${{ inputs.WorkflowPath }}
21+
run: '& "${{ github.action_path }}/src/main.ps1" -SitePath "$env:INPUT_SITE_PATH" -WorkflowPath "$env:INPUT_WORKFLOW_PATH"'

.github/actions/Structure-Site/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ runs:
1515
steps:
1616
- name: Structure site content and config
1717
shell: pwsh
18-
run: '& "${{ github.action_path }}/src/main.ps1" -WorkingDirectory "${{ inputs.WorkingDirectory }}" -Name "${{ inputs.Name }}"'
18+
env:
19+
INPUT_WORKING_DIRECTORY: ${{ inputs.WorkingDirectory }}
20+
INPUT_NAME: ${{ inputs.Name }}
21+
run: '& "${{ github.action_path }}/src/main.ps1" -WorkingDirectory "$env:INPUT_WORKING_DIRECTORY" -Name "$env:INPUT_NAME"'

0 commit comments

Comments
 (0)