Closed apepindev closed 3 years ago
Here's a simplified workflow for reproducing.
# GitHub Action for Laravel
name: Testing Laravel
on: [push, pull_request]
jobs:
laravel:
name: Laravel
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '8.0'
# extensions: mbstring, dom, fileinfo
# coverage: xdebug #optional
- name: PHP version
run: php -v
Oh and I'm using Docker for Mac on a MBP M1 macOS 11.6. Error persists when using arch emulation too for act. (--container-architecture linux/amd64
)
@Paradiddley
It is recommended to use shivammathur/node
images for running setup-php on act
.
https://hub.docker.com/r/shivammathur/node
act -P ubuntu-latest=shivammathur/node:latest
Refer to: https://github.com/shivammathur/setup-php#local-testing-setup
for other images, you will have to specify the runner
as self-hosted
.
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
runner: self-hosted
with:
php-version: '8.0'
Sorry, I missed that in the readme. I've tried it and it's running fine now. Thank you for your help and the quick response.
Describe the bug I'm trying to run my workflow locally using nektos/act and this error keeps coming up in the output when setting up PHP, tools and exts;
It eventually fails completely with anything using the
php
executable;Without tools and extensions defined I get this;
I've used this action before for a package I made and it worked fine. I just ran it again (both projects using v2) and now I'm getting the same error there too.
Version
v1
orv2
.v2
v1
Runners
Operating systems ubuntu-latest
PHP versions 8.0
To Reproduce Use the setup-php action, create a step to output php version and run it locally using act.
Expected behavior Run workflow locally without errors.
Screenshots/Logs
Additional context act version 0.2.24
Are you willing to submit a PR?