Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo: command not found #555

Closed
2 of 5 tasks
tim-bezhashvyly opened this issue Jan 19, 2022 · 2 comments
Closed
2 of 5 tasks

sudo: command not found #555

tim-bezhashvyly opened this issue Jan 19, 2022 · 2 comments
Assignees
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow

Comments

@tim-bezhashvyly
Copy link

Describe the bug
Setup breaks with following output:

/usr/bin/docker exec  50772043d8164cc61863425fc4146e1b13aa7b1ada3d69d5674ee4c45c79d7a3 sh -c "cat /etc/*release | grep ^ID"
/bin/bash /__t/linux.sh 7.4 /__w/_actions/shivammathur/setup-php/v2/dist

==> Setup PHP
/__t/linux.sh: line 182: sudo: command not found
✗ PHP Could not setup PHP 7.4
Error: The process '/bin/bash' failed with exit code 1

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
ubuntu-latest

PHP versions
7.4

To Reproduce

jobs:
  build:

    runs-on: ubuntu-latest

    container:
      image: ubuntu
      options: --network-alias testHost

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP with PECL extension
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'
          extensions: imagick
@tim-bezhashvyly tim-bezhashvyly added the bug Something isn't working label Jan 19, 2022
@shivammathur
Copy link
Owner

shivammathur commented Jan 19, 2022

Please specify the runner environment variable as self-hosted to run setup-php on ubuntu docker image.

https://github.com/shivammathur/setup-php#self-hosted-setup

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  env:
    runner: self-hosted
  with:
    php-version: '7.4'
    extensions: imagick

Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/1719652095/workflow

@shivammathur shivammathur added workflow-edit Issue can be fixed by editing the GitHub Action workflow and removed bug Something isn't working labels Jan 19, 2022
@tim-bezhashvyly
Copy link
Author

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow
Projects
None yet
Development

No branches or pull requests

2 participants