[英]how to call PowerShell script with a GithubActions workflow?
I'm calling .\build.ps1
and it seems to hang:我打电话给.\build.ps1
,它似乎挂起:
https://github.com/nblockchain/ZXing.Net.Xamarin/runs/232358091 https://github.com/nblockchain/ZXing.Net.Xamarin/runs/232358091
Do I need something special?我需要一些特别的东西吗? In AzureDevOps this was working out of the box.在 AzureDevOps 中,这是开箱即用的。
As agreed in the comments, the solution for this issue was to specify the shell to be run in your Action file.正如评论中所同意的,此问题的解决方案是指定 shell 在您的操作文件中运行。 In your case you had to change from:在你的情况下,你必须改变:
- name: Build
run: |
.\build.ps1
to:至:
- name: Build
shell: pwsh
run: |
.\build.ps1
For more details about available values for shell
param, refer to documentation .有关shell
参数的可用值的更多详细信息,请参阅文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.