php-actions / composer

Use the Composer CLI in your Github Actions.
176 stars 56 forks source link

Fail with PHP 8.0 #78

Open netdjw opened 2 years ago

netdjw commented 2 years ago

Hello there,

I run into similar problem with this package like php-actions/phpunit I think - not sure. I use php-actions/composer with private repos (with two private repos, both has the same issue).

If it's help I used 7.4 before, and after only version number upgrade to 8.0 it fails.

I use this yaml file for my action:

name: PR automatic code review - Laravel

on: [push]

jobs:
  phpunit:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: php-actions/composer@v6
      with:
        php_version: 8.0
        working_dir: laravel/
    - uses: php-actions/phpunit@v3
      with:
        php_version: 8.0
        bootstrap: laravel/vendor/autoload.php
        configuration: laravel/phpunit.xml
        memory_limit: 256M

And here is the output:

Run bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/330b13bbb1eadd05bbb627477c1549cd7e62e406/php-build.bash) composer \ && /home/runner/work/_actions/php-actions/composer/v6/composer-action.bash || { echo "::group::Debug output" ; cat /home/runner/work/private-repo/private-repo/output.log ; echo "::endgroup::" ; exit 1; }
  bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/330b13bbb1eadd05bbb627477c1549cd7e62e406/php-build.bash) composer \ && /home/runner/work/_actions/php-actions/composer/v6/composer-action.bash || { echo "::group::Debug output" ; cat /home/runner/work/private-repo/private-repo/output.log ; echo "::endgroup::" ; exit 1; }
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ACTION_VERSION: latest
    ACTION_PHP_VERSION: 8
    ACTION_PHP_EXTENSIONS: 
    ACTION_TOKEN: ***
    ACTION_COMMAND: install
    ACTION_ONLY_ARGS: 
    ACTION_INTERACTION: no
    ACTION_DEV: yes
    ACTION_PROGRESS: no
    ACTION_QUIET: no
    ACTION_ARGS: 
    ACTION_SSH_KEY: 
    ACTION_SSH_KEY_PUB: 
    ACTION_SSH_DOMAIN: 
    ACTION_WORKING_DIR: laravel/
    ACTION_MEMORY_LIMIT: 
Building PHP 8 with extensions:  ...
Debug output
  Running php-build composer
  WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
  Configure a credential helper to remove this warning. See
  https://docs.docker.com/engine/reference/commandline/login/#credentials-store

  Login Succeeded
  Pulling docker.pkg.github.com/my-organization/private-repo/php-actions_composer_private-repo:php-8-build2
  Error response from daemon: manifest for docker.pkg.github.com/my-organization/private-repo/php-actions_composer_private-repo:php-8-build2 not found: manifest unknown: Docker image reference php-actions_composer_private-repo:php-8-build2 not found under repo "my-organization"
  Dockerfile:
  FROM php:8-cli-alpine
  RUN apk add --update --no-cache zip git bash openssh
  Sending build context to Docker daemon  13.08MB

  Step 1/2 : FROM php:8-cli-alpine
  8-cli-alpine: Pulling from library/php
  df9b9388f04a: Already exists
  a60f85627e3d: Pulling fs layer
  89395091f295: Pulling fs layer
  (9/14) Installing openssh-sftp-server (8.8_p1-r1)
  (10/14) Installing openssh-server-common (8.8_p1-r1)
  (11/14) Installing openssh-server (8.8_p1-r1)
  (12/14) Installing openssh (8.8_p1-r1)
  (13/14) Installing unzip (6.0-r9)
  (14/14) Installing zip (3.0-r9)
  Executing busybox-1.34.1-r5.trigger
  OK: 33 MiB in 48 packages
  Removing intermediate container 5700529ffe11
   ---> bb52dacd2f8d
  Successfully built bb52dacd2f8d
  Successfully tagged docker.pkg.github.com/my-organization/private-repo/php-actions_composer_private-repo:php-8-build2
  The push refers to repository [docker.pkg.github.com/my-organization/private-repo/php-actions_composer_private-repo]
  3a1124b25b36: Preparing
  8fdad328498d: Preparing
  87b336694c62: Preparing
  871685c81991: Preparing
  f74db8db0786: Preparing
  8d039d50b605: Preparing
  2a503d89f902: Preparing
  e30ed4afcf1b: Preparing
  ff4eff80267c: Preparing
  4fc242d58285: Preparing
  8d039d50b605: Waiting
  2a503d89f902: Waiting
  e30ed4afcf1b: Waiting
  ff4eff80267c: Waiting
  4fc242d58285: Waiting
  f74db8db0786: Pushed
  87b336694c62: Pushed
  8fdad328498d: Pushed
  3a1124b25b36: Pushed
  871685c81991: Pushed
  e30ed4afcf1b: Pushed
  8d039d50b605: Pushed
  2a503d89f902: Pushed
  ff4eff80267c: Pushed
  4fc242d58285: Pushed
  manifest invalid: Image manifest already exists
Error: Process completed with exit code 1.

Any idea how can I sove this issue?

g105b commented 2 years ago

Please could you test something for me? We've been experiencing issues with the ghcr.io package repository and I wonder whether it has cached a failed build? You can go to the URL https://github.com/orgs/{ORGANISATION}/packages and delete the previous build. Once you've done that, please try again and let me know if that makes any difference.

Thanks!

AnthonyLedru commented 2 years ago

Same problem with PHP 8.1

Error: Process completed with exit code 1.

I tried to remove the package from my organization and retry, but no success

g105b commented 2 years ago

OK thank you. I will create a testcase for this at https://github.com/php-actions/example-composer.