在GitHub动作中使用Nektos/ACT在本地运行PWSH Shell的问题

发布于 2025-02-08 05:41:00 字数 1010 浏览 3 评论 0 原文

我对Docker的超级绿色和寻找与

我能够成功地指向工作流程并运行它,并且一切似乎都按预期工作。当我添加“ pwsh”作为运行外壳的那一刻,我会收到以下失败消息:

docker exec cmd = [pwsh -command。 /var/run/act/workflow/1.ps1] user = workdir = | OCI运行时执行失败:EXEC失败:无法启动容器进程:exec:“ pwsh”:$ path中找不到可执行文件:未知 [test -workflow/test_workflow_job]❌失败 - 运行PWSH TEST

我不确定它是否是错误,因为似乎有一个以前的和类似的解决方案: https://github.com/nektos/act/act/pull/649/commits

我将努力确定这是否确实是另一个错误,或者是否有公然缺少的东西。

任何方向都非常感谢!

这是我的github动作工作流程:

name: test-workflow

on:
  push:
  
jobs:
  test_workflow_job:
    runs-on: ubuntu-latest

    steps:

     - name: CHECKOUT THIS REPOSITORY
       uses: actions/checkout@v2

     - name: RUN PWSH TEST
       shell: pwsh
       run: Write-Host "test"

I'm super green to docker and looking for some troubleshooting direction for working with https://github.com/nektos/act.

I am able to successfully point to a workflow and run it and everything seems to be working as expected. The moment I add "pwsh" as the shell to run I receive the following failure message:

???? docker exec cmd=[pwsh -command . /var/run/act/workflow/1.ps1] user= workdir=
| OCI runtime exec failed: exec failed: unable to start container process: exec: "pwsh": executable file not found in $PATH: unknown
[test-workflow/test_workflow_job] ❌ Failure - RUN PWSH TEST

I'm not sure if it is a bug or not as there seems to be a previous and similar one that was resolved: https://github.com/nektos/act/pull/649/commits.

I'll be working to determine if this is indeed a different bug or if there is something blatant I'm missing.

Any direction is much appreciated!

Here is my github actions workflow:

name: test-workflow

on:
  push:
  
jobs:
  test_workflow_job:
    runs-on: ubuntu-latest

    steps:

     - name: CHECKOUT THIS REPOSITORY
       uses: actions/checkout@v2

     - name: RUN PWSH TEST
       shell: pwsh
       run: Write-Host "test"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文