GithubHelp home page GithubHelp logo

mileschou / composer-action Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 11.0 61 KB

Docker and GitHub Actions for Composer

Home Page: https://github.com/marketplace/actions/composer-action

License: MIT License

Dockerfile 53.52% Shell 46.48%
php composer actions docker

composer-action's Issues

Action is not working anymore "Usage: install ... DEST"

I'm using this Action like this.

    - uses: MilesChou/composer-action/5.6/install@master
      with:
        args: install

4 Months ago it works fine.

Now I'm getting:

Run MilesChou/composer-action/5.6/install@master
  with:
    args: install
/usr/bin/docker run [...] 442333:5a8c9a5481c44acb96846bd04e6cf9c9 install
BusyBox v1.28.4 (2018-12-31 18:05:13 UTC) multi-call binary.

Usage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST

Copy files and set attributes

	-c	Just copy (default)
	-d	Create directories
	-D	Create leading target directories
	-s	Strip symbol table
	-p	Preserve date
	-o USER	Set ownership
	-g GRP	Set group ownership
	-m MODE	Set permissions
	-t DIR	Install to DIR

Documentation: Composer version - switch version with "major" release.

Pleas add note to readme, that Composer upgrade is aligned with "MAJOR" release of this action as this can lead to break CI/CD without notice.

Can I use environment variable to switch version? Is this documented? If not, I propose new feature in separate issue.

Thanks for great work :)

Usage for GitHub Actions is outdated since last update ( = @master fails with no basic auth credentials)

When I build my project with this step in it.

    - uses: MilesChou/composer-action/7.2/install@master
      with:
        args: install --ignore-platform-reqs --optimize-autoloader

Then I'm getting.

Build container for action use: '/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install/Dockerfile'.
  /usr/bin/docker build -t 1e5c35:6227f6570ee04d93b74245ac32be4c71 -f "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install/Dockerfile" "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install"
  Sending build context to Docker daemon  2.048kB
  
  Step 1/2 : FROM docker.pkg.github.com/mileschou/composer-action/runner:7.2
  Get https://docker.pkg.github.com/v2/mileschou/composer-action/runner/manifests/7.2: no basic auth credentials
  Warning: Docker build failed with exit code 1, back off 4.786 seconds before retry.
  /usr/bin/docker build -t 1e5c35:6227f6570ee04d93b74245ac32be4c71 -f "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install/Dockerfile" "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install"
  Sending build context to Docker daemon  2.048kB
  
  Step 1/2 : FROM docker.pkg.github.com/mileschou/composer-action/runner:7.2
  Get https://docker.pkg.github.com/v2/mileschou/composer-action/runner/manifests/7.2: no basic auth credentials
  Warning: Docker build failed with exit code 1, back off 6.447 seconds before retry.
  /usr/bin/docker build -t 1e5c35:6227f6570ee04d93b74245ac32be4c71 -f "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install/Dockerfile" "/home/runner/work/_actions/MilesChou/composer-action/master/7.2/install"
  Sending build context to Docker daemon  2.048kB
  
  Step 1/2 : FROM docker.pkg.github.com/mileschou/composer-action/runner:7.2
  Get https://docker.pkg.github.com/v2/mileschou/composer-action/runner/manifests/7.2: no basic auth credentials
Error: Docker build failed with exit code 1

When I replace the master version with old v1.0.2 then its working again.

    - uses: MilesChou/composer-action/7.2/[email protected]
      with:
        args: install --ignore-platform-reqs --optimize-autoloader

Success:

Build container for action use: '/home/runner/work/_actions/MilesChou/composer-action/v1.0.2/7.2/install/Dockerfile'.
  /usr/bin/docker build -t 1e5c35:09b037ea0a2445efa66b0171d4e658d3 -f "/home/runner/work/_actions/MilesChou/composer-action/v1.0.2/7.2/install/Dockerfile" "/home/runner/work/_actions/MilesChou/composer-action/v1.0.2/7.2/install"
  Sending build context to Docker daemon  2.048kB
  
  Step 1/2 : FROM mileschou/composer:7.2
  7.2: Pulling from mileschou/composer
  df20fa9351a1: Pulling fs layer
  b358d6dbbdff: Pulling fs layer
  0232d962484c: Pulling fs layer
  0c1d3ac04d2a: Pulling fs layer
  ff8d534bb3f0: Pulling fs layer
[...]
Successfully built 25445f789723
Successfully tagged 1e5c35:09b037ea0a2445efa66b0171d4e658d3

I think its since the commits at 3rd October: 1030a61

Maybe you can fix that issue, @MilesChou?
Or updating the documentation so that it's working again ๐Ÿ˜Š

Thank you very much! I like your Github Action very much ๐Ÿฅณ

Uncaught Error: Class 'ZipArchive' not found?

Hi @MilesChou,

I've been using the 'MilesChou/composer-action' successfully this year and was able to generate a zip file from by github build.

Recently I pushed an update and the build failed with this error claiming that the the ZipArchive was not present.

ReleaseBuilder: bhaa-wordpress-plugin.zip > BHAA\utils\ReleaseBuilder::createZip Fatal error: Uncaught Error: Class 'ZipArchive' not found in /github/workspace/src/utils/ReleaseBuilder.php:18 Stack trace:

From investigate it suggests that the php library for zip is not installed, but i believe it is. I appreciate that the composer-action image is not at issue but might there be a combination of changes to the github ubuntu:latest version which might have caused this issue to start?
Kind Regards,
emeraldjava

Action is running as root?

The action creates files as root, but other actions use a different one, which causes permission issues

./src:
total 96
drwxr-xr-x  5 runner docker  4096 Jan  4 18:27 .
drwxr-xr-x  5 runner docker  4096 Jan  4 18:27 ..
-rw-r--r--  1 runner docker   608 Jan  4 18:27 composer.json
-rw-r--r--  1 runner docker 72759 Jan  4 18:27 composer.lock
drwxr-xr-x 13 root   root    4096 Jan  4 18:27 htdocs
drwxr-xr-x  2 runner docker  4096 Jan  4 18:27 scripts
drwxr-xr-x 15 root   root    4096 Jan  4 18:27 vendor

git was not found, check that it is installed and in your PATH env.

Hi,

I'm getting an error when trying to run composer install:

    Now trying to download from dist
  - Installing phpunit/phpunit (8.5.x-dev 8474e22): Loading from cache
  - Installing codeception/phpunit-wrapper (8.1.2): Loading from cache
  - Installing codeception/stub (3.6.1): Loading from cache
  - Installing composer/ca-bundle (dev-master 95c63ab): Cloning 95c63ab211
    Failed to download composer/ca-bundle from source: Failed to clone https://github.com/composer/ca-bundle.git, git was not found, check that it is installed and in your PATH env.

This is what the step looks like:

- uses: MilesChou/composer-action@master
  with:
    args: install --ignore-platform-reqs

Have you ever faced this before, is there something you'd recommend me trying?

Thanks!

PHP version is inaccurate

Hi @MilesChou

Actions in MilesChou/composer-action/ do not check what PHP version is available while running the "composer --help" command within the testing workflow. Revealing with php -v would add certainty that it is the expected PHP version.

I say this, because I recently I encountered this
image

That the docker container PHP version appears to be 8.1 ๐Ÿค”

Do you see something wrong in my workflow file? This issue did not exist before.

name: CI

on:
  pull_request:
    branches: [ master ]

jobs:
  build74:
    name: PHP 7.4 Code quality check
    runs-on: ubuntu-latest
    steps:
      - uses: MilesChou/composer-action/7.4@master
      - uses: actions/checkout@v2

      - name: Validate composer.json and composer.lock
        run: composer validate --no-interaction --strict

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress --no-suggest

      - name: Check for PHP syntax errors
        run: ./vendor/bin/parallel-lint --exclude vendor/ .

      - name: Validate PHP code style
        run: ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no .

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.