Skip to content

Composer installation fails with invalid DOCKER_ENV contents #128

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

Open
BradleyGoulding opened this issue May 15, 2025 · 0 comments
Open

Comments

@BradleyGoulding
Copy link

Description
I encountered an issue while using php-actions/composer@v6 in my GitHub Actions workflow. The workflow is set up as follows:

  - name: Install dependencies
    uses: php-actions/composer@v6
    with:
      php_version: '8.1'
      version: 2

This is running on a blacksmith.sh arm runner

However, the installation fails with the following error message:

Building PHP 8.1 with extensions:  ...
docker: invalid env file (./DOCKER_ENV): variable 'Available CPUs: 14' contains whitespaces

Run 'docker run --help' for more information

Expected behavior:
The process should pass

Additional context:
I have forked this repo and debugged the DOCKER_ENV step and found the following

BLACKSMITH_STORE_STATS=System Statistics:
-----------------
Available CPUs: 10
Jobs by Process ID:
-----------------
PID 2055811: 13 jobs
Total: 13 jobs across 1 process
Devices by Process ID:
-----------------
PID 2055811: 13 devices
Total: 13 devices across 1 process

This is causing the docker process to fail

I have reached out to Blacksmith support to advise them of this, however I think that this action should also be sanitizing or otherwise checking the env values it writes to DOCKER_ENV
This action runs correctly on the github standard runners, I have also tested it on blacksmiths x86 runners with the same error being observed.

I have opened a PR with a patch for this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant