fix(workflows): use shell:powershell (PS 5.1) instead of pwsh; fix ciScriptsDir path
- All 3 workflows: pwsh -> powershell (host requires PS 5.1, not Core 7+) - workflow-example.yml: replace GITHUB_WORKSPACE-relative ciScriptsDir with hardcoded host path; use SSH alias URL (host-clone mode) instead of HTTP - docs: add WORKFLOW-AUTHORING.md reference for AI and developers
This commit is contained in:
@@ -47,17 +47,17 @@ jobs:
|
||||
# This script handles the entire VM lifecycle:
|
||||
# clone → start → wait ready → build → collect artifacts → destroy
|
||||
- name: Build in ephemeral VM
|
||||
shell: pwsh
|
||||
shell: powershell
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# Resolve the scripts directory relative to the checked-out repo.
|
||||
# If your CI scripts are in a separate repo, adjust the path.
|
||||
$ciScriptsDir = Join-Path $env:GITHUB_WORKSPACE 'scripts'
|
||||
# CI scripts are at a fixed location on the runner host.
|
||||
# Do NOT use $env:GITHUB_WORKSPACE — the CI system is in a separate repo.
|
||||
$ciScriptsDir = 'N:\Code\Workspace\Local-CI-CD-System\scripts'
|
||||
|
||||
& "$ciScriptsDir\Invoke-CIJob.ps1" `
|
||||
-JobId "${{ github.run_id }}-${{ github.run_attempt }}" `
|
||||
-RepoUrl "${{ github.server_url }}/${{ github.repository }}.git" `
|
||||
-RepoUrl "ssh://gitea-ci/${{ github.repository }}.git" `
|
||||
-Branch "${{ github.ref_name }}" `
|
||||
-Commit "${{ github.sha }}" `
|
||||
-Submodules `
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Run CI Job
|
||||
shell: pwsh
|
||||
shell: powershell
|
||||
run: |
|
||||
& 'N:\Code\Workspace\Local-CI-CD-System\scripts\Invoke-CIJob.ps1' `
|
||||
-JobId '${{ github.run_id }}' `
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run PSScriptAnalyzer
|
||||
shell: pwsh
|
||||
shell: powershell
|
||||
run: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user