[GH-ISSUE #1991] Actions with pwsh does not work #952

Closed
opened 2026-03-01 21:47:41 +03:00 by kerem · 2 comments
Owner

Originally created by @microhobby on GitHub (Sep 2, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1991

Bug report info

act version:            0.2.50
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:
        /home/castello/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.20.7
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.50 -X main.commit=80b0955303888742c3ab73af5758bb7b01f5f57c -X main.date=2023-09-01T02:12:50Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         80b0955303888742c3ab73af5758bb7b01f5f57c
                vcs.time:             2023-09-01T02:12:28Z
                vcs.modified:         false
Docker Engine:
        Engine version:        24.0.4
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu 22.04.2 LTS
        OS type:               linux
        OS version:            22.04
        OS arch:               x86_64
        OS kernel:             6.5.0-rc1-MicroHobby-win11+
        OS CPU:                16
        OS memory:             31783 MB
        Security options:
                name=seccomp,profile=builtin

Command used with act

act -j python3

Describe issue

Trying to run an action that uses the shell: pwsh does not work and return the follow:

No response

Workflow content

name: Python Containers
on:
  - push

jobs:
  python3:
    runs-on: ubuntu-latest
    name: Python3 Container
    strategy:
      matrix:
        project:
          - folder: python3Console
            container: python3-console
            arch: arm64


    steps:
      - uses: actions/checkout@v3

      - name: Build ${{ matrix.project.folder }} Dockerfile
        shell: pwsh
        env:
          PROJECT_FOLDER: ${{ matrix.project.folder }}
          PROJECT_CONTAINER: ${{ matrix.project.container }}
          PROJECT_ARCH: ${{ matrix.project.arch }}
          DOCKER_LOGIN: localhost:5002

        run: |
          docker run --rm --privileged torizon/binfmt

          scripts/createFromTemplate.ps1 `
            $env:GITHUB_WORKSPACE/$env:PROJECT_FOLDER `
            "${env:PROJECT_FOLDER}CITest" `
            "${env:PROJECT_CONTAINER}-ci-test" `
            $env:GITHUB_WORKSPACE `
            $env:PROJECT_FOLDER `
            false `
            false

          cd "${env:GITHUB_WORKSPACE}/${env:PROJECT_FOLDER}CITest"
          ./.vscode/tasks.ps1 run build-container-torizon-${env:PROJECT_ARCH}

Relevant log output

[Python Containers/Python3 Container] 🚀  Start image=catthehacker/ubuntu:act-latest
[Python Containers/Python3 Container]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[Python Containers/Python3 Container] using DockerAuthConfig authentication for docker pull
[Python Containers/Python3 Container]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Python Containers/Python3 Container]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[Python Containers/Python3 Container] 🧪  Matrix: map[project:map[arch:arm64 container:python3-console folder:python3Console]]
[Python Containers/Python3 Container] ⭐ Run Main actions/checkout@v3
[Python Containers/Python3 Container]   🐳  docker cp src=/home/castello/work/torizon-templates/. dst=/home/castello/work/torizon-templates
[Python Containers/Python3 Container]   ✅  Success - Main actions/checkout@v3
[Python Containers/Python3 Container] ⭐ Run Main Build python3Console Dockerfile
[Python Containers/Python3 Container]   🐳  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
[Python Containers/Python3 Container]   ❌  Failure - Main Build python3Console Dockerfile
[Python Containers/Python3 Container] exitcode '126': failure
[Python Containers/Python3 Container] 🏁  Job failed
Error: Job 'Python3 Container' failed

Additional information

No response

Originally created by @microhobby on GitHub (Sep 2, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1991 ### Bug report info ```plain text act version: 0.2.50 GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/castello/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.20.7 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.50 -X main.commit=80b0955303888742c3ab73af5758bb7b01f5f57c -X main.date=2023-09-01T02:12:50Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: 80b0955303888742c3ab73af5758bb7b01f5f57c vcs.time: 2023-09-01T02:12:28Z vcs.modified: false Docker Engine: Engine version: 24.0.4 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Ubuntu 22.04.2 LTS OS type: linux OS version: 22.04 OS arch: x86_64 OS kernel: 6.5.0-rc1-MicroHobby-win11+ OS CPU: 16 OS memory: 31783 MB Security options: name=seccomp,profile=builtin ``` ### Command used with act ```sh act -j python3 ``` ### Describe issue Trying to run an action that uses the `shell: pwsh` does not work and return the follow: ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Python Containers on: - push jobs: python3: runs-on: ubuntu-latest name: Python3 Container strategy: matrix: project: - folder: python3Console container: python3-console arch: arm64 steps: - uses: actions/checkout@v3 - name: Build ${{ matrix.project.folder }} Dockerfile shell: pwsh env: PROJECT_FOLDER: ${{ matrix.project.folder }} PROJECT_CONTAINER: ${{ matrix.project.container }} PROJECT_ARCH: ${{ matrix.project.arch }} DOCKER_LOGIN: localhost:5002 run: | docker run --rm --privileged torizon/binfmt scripts/createFromTemplate.ps1 ` $env:GITHUB_WORKSPACE/$env:PROJECT_FOLDER ` "${env:PROJECT_FOLDER}CITest" ` "${env:PROJECT_CONTAINER}-ci-test" ` $env:GITHUB_WORKSPACE ` $env:PROJECT_FOLDER ` false ` false cd "${env:GITHUB_WORKSPACE}/${env:PROJECT_FOLDER}CITest" ./.vscode/tasks.ps1 run build-container-torizon-${env:PROJECT_ARCH} ``` ### Relevant log output ```sh [Python Containers/Python3 Container] 🚀 Start image=catthehacker/ubuntu:act-latest [Python Containers/Python3 Container] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true [Python Containers/Python3 Container] using DockerAuthConfig authentication for docker pull [Python Containers/Python3 Container] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] [Python Containers/Python3 Container] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] [Python Containers/Python3 Container] 🧪 Matrix: map[project:map[arch:arm64 container:python3-console folder:python3Console]] [Python Containers/Python3 Container] ⭐ Run Main actions/checkout@v3 [Python Containers/Python3 Container] 🐳 docker cp src=/home/castello/work/torizon-templates/. dst=/home/castello/work/torizon-templates [Python Containers/Python3 Container] ✅ Success - Main actions/checkout@v3 [Python Containers/Python3 Container] ⭐ Run Main Build python3Console Dockerfile [Python Containers/Python3 Container] 🐳 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 [Python Containers/Python3 Container] ❌ Failure - Main Build python3Console Dockerfile [Python Containers/Python3 Container] exitcode '126': failure [Python Containers/Python3 Container] 🏁 Job failed Error: Job 'Python3 Container' failed ``` ### Additional information _No response_
kerem 2026-03-01 21:47:41 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@microhobby commented on GitHub (Sep 2, 2023):

ok, so using the image large worked

<!-- gh-comment-id:1703962363 --> @microhobby commented on GitHub (Sep 2, 2023): ok, so using the image large worked
Author
Owner

@jjerphan commented on GitHub (Apr 11, 2024):

I am still meeting this problem with act 0.2.61.

<!-- gh-comment-id:2050025476 --> @jjerphan commented on GitHub (Apr 11, 2024): I am still meeting this problem with act 0.2.61.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#952
No description provided.