File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8181 exit 1
8282 }
8383
84+ if ($env:GITHUB_EVENT_NAME_VALUE -eq 'workflow_dispatch' -and $runId -notmatch '^\d+$') {
85+ Write-Error "Input run_id must be a numeric GitHub Actions run id. Received: '$runId'."
86+ exit 1
87+ }
88+
8489 if ([string]::IsNullOrWhiteSpace($tagName) -or -not $tagName.StartsWith('v')) {
8590 Write-Error "Expected a tag-based workflow run, received '$tagName'."
8691 exit 1
9398 shell : pwsh
9499 env :
95100 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101+ DOCS_RUN_ID : ${{ steps.context.outputs.run_id }}
96102 run : |
97103 $ErrorActionPreference = 'Stop'
98- gh run download ${{ steps.context.outputs.run_id }} --name module-docs --dir docs-artifact
104+ if ([string]::IsNullOrWhiteSpace($env:DOCS_RUN_ID) -or $env:DOCS_RUN_ID -notmatch '^\d+$') {
105+ Write-Error "Resolved run id is invalid: '$env:DOCS_RUN_ID'."
106+ exit 1
107+ }
108+ gh run download "$env:DOCS_RUN_ID" --name module-docs --dir docs-artifact
99109
100110 - name : Clone and update homotechsualdocs
101111 shell : pwsh
You can’t perform that action at this time.
0 commit comments