php-actions / composer Goto Github PK
View Code? Open in Web Editor NEWUse the Composer CLI in your Github Actions.
Use the Composer CLI in your Github Actions.
- name: Install Dependencies
uses: php-actions/composer@v5
with:
dev: yes
version: 1
php_version: 7.3
command: install
args: -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist --ignore-platform-reqs
The output just says
cat: /home/runner/work/accounts/accounts/output.log: No such file or directory
Hi all, for the first time I have problems with this amazing tool.
I have already developed many githubActions using php-actions/composer
but today I encountered a problem:
No private keys supplied
This is the complete log and you can find the output here:
https://github.com/PUGX/badge-poser/runs/2624411559?check_suite_focus=true
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/pugx/badge-poser/php-actions_composer_badge-poser:php-8-build2
WARNING: ⚠️ Failed to pull manifest by the resolved digest. This registry does not
appear to conform to the distribution registry specification; falling back to
pull by tag. This fallback is DEPRECATED, and will be removed in a future
release. Please contact admins of https://docker.pkg.github.com. ⚠️
php-8-build2: Pulling from pugx/badge-poser/php-actions_composer_badge-poser
540db60ca938: Already exists
933cf2f4a68f: Pulling fs layer
93c5cc202a60: Pulling fs layer
74403c16157d: Pulling fs layer
ccb9776fa7b0: Pulling fs layer
5f4ca0d03106: Pulling fs layer
bd76023543a8: Pulling fs layer
77d0b61488f4: Pulling fs layer
57e642ce993f: Pulling fs layer
0dfccbae1c18: Pulling fs layer
ccb9776fa7b0: Waiting
5f4ca0d03106: Waiting
bd76023543a8: Waiting
77d0b61488f4: Waiting
57e642ce993f: Waiting
0dfccbae1c18: Waiting
93c5cc202a60: Verifying Checksum
93c5cc202a60: Download complete
933cf2f4a68f: Download complete
74403c16157d: Verifying Checksum
74403c16157d: Download complete
933cf2f4a68f: Pull complete
5f4ca0d03106: Verifying Checksum
5f4ca0d03106: Download complete
93c5cc202a60: Pull complete
74403c16157d: Pull complete
ccb9776fa7b0: Verifying Checksum
ccb9776fa7b0: Download complete
77d0b61488f4: Verifying Checksum
77d0b61488f4: Download complete
bd76023543a8: Verifying Checksum
bd76023543a8: Download complete
ccb9776fa7b0: Pull complete
57e642ce993f: Verifying Checksum
57e642ce993f: Download complete
5f4ca0d03106: Pull complete
0dfccbae1c18: Verifying Checksum
0dfccbae1c18: Download complete
bd76023543a8: Pull complete
77d0b61488f4: Pull complete
57e642ce993f: Pull complete
0dfccbae1c18: Pull complete
Digest: sha256:9123a4bddb7369bd8384ae1f28208da82bad86eec22bd7940ceed59c7c01c296
Status: Downloaded newer image for docker.pkg.github.com/pugx/badge-poser/php-actions_composer_badge-poser:php-8-build2
docker.pkg.github.com/pugx/badge-poser/php-actions_composer_badge-poser:php-8-build2
Docker tag: docker.pkg.github.com/pugx/badge-poser/php-actions_composer_badge-poser:php-8-build2
No private keys supplied
Command: composer install --no-progress --no-interaction --prefer-dist
Error: Process completed with exit code 1.
Can someone explain to me why am I getting this error?
I have also enabled the improved container support with the Container registry
Thanks.
have got bcmath being successfully installed by shivammathur/setup-php@v2
, but php-actions/composer@v2
fails saying that ext-bcmath is not found.
Quick Q: While I understand SSH is a better approach to authentication. In a scenario where that is not available. Can http-basic auth still be used? I tried a few permutations and it didn't seem to allow this approach. I would think that the action would allow something that composer itself allows? But more than likely I am doing it wrong?
I setup a step within my job authenticating utilzing the with: command:
referencing a few github secrets. But the authentication always seems to fail.
This github action is unable to apply composer patches, the specific add on I am using is - https://github.com/cweagans/composer-patches
It is strange that if I use "composer install" instead of this package then composer can apply the patches.
The add on requires "patch" to be installed on the server, I can confirm this was installed on the Ubuntu OS.
Are there permission restriction on what this action can do? Perhaps it cannot write/update to the the file system?
Here's the composer action which I run
Run php-actions/composer@v5
with:
ssh_key_pub: ***
version: latest
php_version: latest
command: install
interaction: no
dev: yes
progress: no
quiet: no
env:
and it gives me this error.
cat: /home/ubuntu/runner/_work/xyz/xyz/output.log: No such file or directory
Hello,
I got this error in my Github Actions workflow :
2020-11-30T17:54:32.4308630Z ##[section]Starting: Request a runner to run this job
2020-11-30T17:54:32.7417236Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2020-11-30T17:54:32.7417340Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-11-30T17:54:32.7417715Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-11-30T17:54:32.9082765Z ##[section]Finishing: Request a runner to run this job
2020-11-30T17:54:40.4534268Z Current runner version: '2.274.2'
2020-11-30T17:54:40.4562645Z ##[group]Operating System
2020-11-30T17:54:40.4563880Z Ubuntu
2020-11-30T17:54:40.4564678Z 18.04.5
2020-11-30T17:54:40.4565364Z LTS
2020-11-30T17:54:40.4566353Z ##[endgroup]
2020-11-30T17:54:40.4567248Z ##[group]Virtual Environment
2020-11-30T17:54:40.4568217Z Environment: ubuntu-18.04
2020-11-30T17:54:40.4569122Z Version: 20201115.1
2020-11-30T17:54:40.4570434Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20201115.1/images/linux/Ubuntu1804-README.md
2020-11-30T17:54:40.4572287Z ##[endgroup]
2020-11-30T17:54:40.4575954Z Prepare workflow directory
2020-11-30T17:54:40.5169418Z Prepare all required actions
2020-11-30T17:54:40.5181684Z Getting action download info
2020-11-30T17:54:40.8440241Z Download action repository 'actions/checkout@v2'
2020-11-30T17:54:42.6266006Z Download action repository 'actions/[email protected]'
2020-11-30T17:54:42.8798620Z Download action repository 'php-actions/composer@v4'
2020-11-30T17:54:43.3395739Z ##[group]Build container for action use: '/home/runner/work/_actions/php-actions/composer/v4/Dockerfile'.
2020-11-30T17:54:43.3461174Z ##[command]/usr/bin/docker build -t 179394:8071e738fc7242248de99851b7bdb269 -f "/home/runner/work/_actions/php-actions/composer/v4/Dockerfile" "/home/runner/work/_actions/php-actions/composer/v4"
2020-11-30T17:54:44.1903565Z Sending build context to Docker daemon 19.46kB
2020-11-30T17:54:44.1905130Z
2020-11-30T17:54:44.2311914Z Step 1/14 : FROM ghcr.io/php-actions/php-build:v1
2020-11-30T17:54:45.1246235Z error pulling image configuration: denied: unauthenticated: User cannot be authenticated with the token provided.
2020-11-30T17:54:45.1249005Z v1: Pulling from php-actions/php-build
2020-11-30T17:54:45.1250476Z 3ff22d22a855: Pulling fs layer
2020-11-30T17:54:45.1252068Z e7cb79d19722: Pulling fs layer
2020-11-30T17:54:45.1253406Z 323d0d660b6a: Pulling fs layer
2020-11-30T17:54:45.1254056Z b7f616834fd0: Pulling fs layer
2020-11-30T17:54:45.1259024Z 371095d385c1: Pulling fs layer
2020-11-30T17:54:45.1259715Z 8e7906228a34: Pulling fs layer
2020-11-30T17:54:45.1260378Z d18e021a7260: Pulling fs layer
2020-11-30T17:54:45.1261039Z 8543c6b5499b: Pulling fs layer
2020-11-30T17:54:45.1261680Z 87b955babc78: Pulling fs layer
2020-11-30T17:54:45.1262343Z 603eae686411: Pulling fs layer
2020-11-30T17:54:45.1263001Z 4c678b90297a: Pulling fs layer
2020-11-30T17:54:45.1263665Z 30afe4abeade: Pulling fs layer
2020-11-30T17:54:45.1264358Z 466ce11a738a: Pulling fs layer
2020-11-30T17:54:45.1265025Z 5497c638643f: Pulling fs layer
2020-11-30T17:54:45.1265678Z ec6e0b3a57b2: Pulling fs layer
2020-11-30T17:54:45.1266377Z 54daec61ba20: Pulling fs layer
2020-11-30T17:54:45.1267062Z 27fd7e37b8f1: Pulling fs layer
2020-11-30T17:54:45.1267713Z 350e0bba14b5: Pulling fs layer
2020-11-30T17:54:45.1268395Z b7f616834fd0: Waiting
2020-11-30T17:54:45.1268977Z 371095d385c1: Waiting
2020-11-30T17:54:45.1269570Z 8e7906228a34: Waiting
2020-11-30T17:54:45.1270167Z d18e021a7260: Waiting
2020-11-30T17:54:45.1270756Z 8543c6b5499b: Waiting
2020-11-30T17:54:45.1271354Z 87b955babc78: Waiting
2020-11-30T17:54:45.1271959Z 603eae686411: Waiting
2020-11-30T17:54:45.1272540Z 4c678b90297a: Waiting
2020-11-30T17:54:45.1273155Z 30afe4abeade: Waiting
2020-11-30T17:54:45.1273773Z 466ce11a738a: Waiting
2020-11-30T17:54:45.1274342Z 5497c638643f: Waiting
2020-11-30T17:54:45.1274954Z ec6e0b3a57b2: Waiting
2020-11-30T17:54:45.1275588Z 54daec61ba20: Waiting
2020-11-30T17:54:45.1276494Z 27fd7e37b8f1: Waiting
2020-11-30T17:54:45.1277111Z 350e0bba14b5: Waiting
2020-11-30T17:54:45.1292285Z ##[warning]Docker build failed with exit code 1, back off 8.494 seconds before retry.
2020-11-30T17:54:53.6263072Z ##[command]/usr/bin/docker build -t 179394:8071e738fc7242248de99851b7bdb269 -f "/home/runner/work/_actions/php-actions/composer/v4/Dockerfile" "/home/runner/work/_actions/php-actions/composer/v4"
2020-11-30T17:54:53.6679446Z Sending build context to Docker daemon 19.46kB
2020-11-30T17:54:53.6680167Z
2020-11-30T17:54:53.7146838Z Step 1/14 : FROM ghcr.io/php-actions/php-build:v1
2020-11-30T17:54:53.9766497Z v1: Pulling from php-actions/php-build
2020-11-30T17:54:53.9770189Z 3ff22d22a855: Pulling fs layer
2020-11-30T17:54:53.9773889Z e7cb79d19722: Pulling fs layer
2020-11-30T17:54:53.9776708Z 323d0d660b6a: Pulling fs layer
2020-11-30T17:54:53.9779421Z b7f616834fd0: Pulling fs layer
2020-11-30T17:54:53.9782241Z 371095d385c1: Pulling fs layer
2020-11-30T17:54:53.9786826Z 8e7906228a34: Pulling fs layer
2020-11-30T17:54:53.9788302Z d18e021a7260: Pulling fs layer
2020-11-30T17:54:53.9789766Z 8543c6b5499b: Pulling fs layer
2020-11-30T17:54:53.9803468Z 87b955babc78: Pulling fs layer
2020-11-30T17:54:53.9815193Z 603eae686411: Pulling fs layer
2020-11-30T17:54:53.9822257Z 4c678b90297a: Pulling fs layer
2020-11-30T17:54:53.9826661Z 30afe4abeade: Pulling fs layer
2020-11-30T17:54:53.9830645Z 466ce11a738a: Pulling fs layer
2020-11-30T17:54:53.9834534Z 5497c638643f: Pulling fs layer
2020-11-30T17:54:53.9837141Z ec6e0b3a57b2: Pulling fs layer
2020-11-30T17:54:53.9840672Z 54daec61ba20: Pulling fs layer
2020-11-30T17:54:53.9843384Z 27fd7e37b8f1: Pulling fs layer
2020-11-30T17:54:53.9845806Z 350e0bba14b5: Pulling fs layer
2020-11-30T17:54:53.9848371Z b7f616834fd0: Waiting
2020-11-30T17:54:53.9850764Z 371095d385c1: Waiting
2020-11-30T17:54:53.9853542Z 8e7906228a34: Waiting
2020-11-30T17:54:53.9856047Z d18e021a7260: Waiting
2020-11-30T17:54:53.9858238Z 8543c6b5499b: Waiting
2020-11-30T17:54:53.9860459Z 87b955babc78: Waiting
2020-11-30T17:54:53.9863511Z 603eae686411: Waiting
2020-11-30T17:54:53.9865952Z 4c678b90297a: Waiting
2020-11-30T17:54:53.9868193Z 30afe4abeade: Waiting
2020-11-30T17:54:53.9870711Z 466ce11a738a: Waiting
2020-11-30T17:54:53.9872908Z 5497c638643f: Waiting
2020-11-30T17:54:53.9875242Z ec6e0b3a57b2: Waiting
2020-11-30T17:54:53.9877714Z 54daec61ba20: Waiting
2020-11-30T17:54:53.9880343Z 27fd7e37b8f1: Waiting
2020-11-30T17:54:53.9882706Z 350e0bba14b5: Waiting
2020-11-30T17:54:54.0636231Z error pulling image configuration: denied: unauthenticated: User cannot be authenticated with the token provided.
2020-11-30T17:54:54.0644536Z ##[warning]Docker build failed with exit code 1, back off 5.226 seconds before retry.
2020-11-30T17:54:59.2861645Z ##[command]/usr/bin/docker build -t 179394:8071e738fc7242248de99851b7bdb269 -f "/home/runner/work/_actions/php-actions/composer/v4/Dockerfile" "/home/runner/work/_actions/php-actions/composer/v4"
2020-11-30T17:54:59.3412344Z Sending build context to Docker daemon 19.46kB
2020-11-30T17:54:59.3413349Z
2020-11-30T17:54:59.3973602Z Step 1/14 : FROM ghcr.io/php-actions/php-build:v1
2020-11-30T17:54:59.6358083Z v1: Pulling from php-actions/php-build
2020-11-30T17:54:59.6359130Z 3ff22d22a855: Pulling fs layer
2020-11-30T17:54:59.6359965Z e7cb79d19722: Pulling fs layer
2020-11-30T17:54:59.6360706Z 323d0d660b6a: Pulling fs layer
2020-11-30T17:54:59.6361420Z b7f616834fd0: Pulling fs layer
2020-11-30T17:54:59.6362141Z 371095d385c1: Pulling fs layer
2020-11-30T17:54:59.6362919Z 8e7906228a34: Pulling fs layer
2020-11-30T17:54:59.6363628Z d18e021a7260: Pulling fs layer
2020-11-30T17:54:59.6364369Z 8543c6b5499b: Pulling fs layer
2020-11-30T17:54:59.6365098Z 87b955babc78: Pulling fs layer
2020-11-30T17:54:59.6365792Z 603eae686411: Pulling fs layer
2020-11-30T17:54:59.6366524Z 4c678b90297a: Pulling fs layer
2020-11-30T17:54:59.6367286Z 30afe4abeade: Pulling fs layer
2020-11-30T17:54:59.6368007Z 466ce11a738a: Pulling fs layer
2020-11-30T17:54:59.6368731Z 5497c638643f: Pulling fs layer
2020-11-30T17:54:59.6369496Z ec6e0b3a57b2: Pulling fs layer
2020-11-30T17:54:59.6370224Z 54daec61ba20: Pulling fs layer
2020-11-30T17:54:59.6371166Z 27fd7e37b8f1: Pulling fs layer
2020-11-30T17:54:59.6371914Z 350e0bba14b5: Pulling fs layer
2020-11-30T17:54:59.6372586Z b7f616834fd0: Waiting
2020-11-30T17:54:59.6373271Z 371095d385c1: Waiting
2020-11-30T17:54:59.6373881Z 8e7906228a34: Waiting
2020-11-30T17:54:59.6374575Z d18e021a7260: Waiting
2020-11-30T17:54:59.6375241Z 8543c6b5499b: Waiting
2020-11-30T17:54:59.6375919Z 87b955babc78: Waiting
2020-11-30T17:54:59.6376819Z 603eae686411: Waiting
2020-11-30T17:54:59.6377517Z 4c678b90297a: Waiting
2020-11-30T17:54:59.6378159Z 30afe4abeade: Waiting
2020-11-30T17:54:59.6378872Z 466ce11a738a: Waiting
2020-11-30T17:54:59.6379531Z 5497c638643f: Waiting
2020-11-30T17:54:59.6380178Z ec6e0b3a57b2: Waiting
2020-11-30T17:54:59.6380895Z 54daec61ba20: Waiting
2020-11-30T17:54:59.6381628Z 27fd7e37b8f1: Waiting
2020-11-30T17:54:59.6382266Z 350e0bba14b5: Waiting
2020-11-30T17:54:59.7205666Z error pulling image configuration: denied: unauthenticated: User cannot be authenticated with the token provided.
2020-11-30T17:54:59.7224373Z ##[endgroup]
2020-11-30T17:54:59.7363552Z ##[error]Docker build failed with exit code 1
2020-11-30T17:54:59.7528440Z Cleaning up orphan processes
Same error when I want to build the image:
$ docker build .
Sending build context to Docker daemon 174.6kB
Step 1/14 : FROM ghcr.io/php-actions/php-build:v1
v1: Pulling from php-actions/php-build
3ff22d22a855: Pulling fs layer
e7cb79d19722: Pulling fs layer
323d0d660b6a: Pulling fs layer
b7f616834fd0: Waiting
371095d385c1: Waiting
8e7906228a34: Waiting
d18e021a7260: Waiting
8543c6b5499b: Waiting
87b955babc78: Waiting
603eae686411: Waiting
4c678b90297a: Waiting
30afe4abeade: Waiting
466ce11a738a: Waiting
5497c638643f: Waiting
ec6e0b3a57b2: Waiting
54daec61ba20: Waiting
27fd7e37b8f1: Waiting
350e0bba14b5: Waiting
error pulling image configuration: denied: unauthenticated: User cannot be authenticated with the token provided.
Where is the problem? On you side?
Thanks your help!
I'm trying to install on a subdirectory using
args: --profile --ignore-platform-reqs --working-dir=$GITHUB_WORKSPACE/wp
But with no success, the $GITHUB_WORKSPACE is not parsed. Any idea on what can be done?
Hello,
Today I've tested this action. While it works, I was surprised that the repo now shows two packages related to the php-actions:
https://github.com/jan-di?tab=packages&repo_name=php-config
I've only run a single workflow that seems to created them (I've used the composer action and the phpunit action):
https://github.com/jan-di/php-config/runs/1636637449?check_suite_focus=true
Is this a known behaviour? And do you know how I can delete those packages?
Hi, I'm trying to pull in a private repository. I have added the SSH key through a different GitHub action. I have also tested cloning the private repo straight after which is fine, which means it's picking up the SSH key as expected, however when it finally gets around to the install I'm met with:
Host key verification failed.
fatal: Could not read from remote repository.
Is there something I'm missing?
Hi,
I'm attempting to use this action along with the ffraenz/private-composer-installer
package where a key is required to obtain another package. This key is passed as an environment variable and works both locally and in another CI environments.
However, when using this action I'm getting errors where the environment variables are not being set.
Just for clarification, how are environment variables exposed?
- name: Install dependencies
uses: php-actions/composer@v5
with:
php_version: '7.4'
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
The log shows the environment variable being passed.
Run php-actions/composer@v5
with:
php_version: 7.4
version: latest
command: install
interaction: no
dev: yes
progress: no
quiet: no
env:
SECRET_KEY: ***
I must admit, this is my first time using GitHub Actions (I usually use GitLab CI) so perhaps I'm missing something.
Many thanks.
Instead of using the specific url for downloading composer
https://getcomposer.org/download/1.10.17/composer.phar
you could use a generic one:
https://getcomposer.org/composer-1.phar
If you want this I could open a PR for that
I've add a Github Action on my repo to run PHPUnit tests.
Github action:
name: CI
on: [push]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5
- name: PHPUnit Tests
uses: php-actions/phpunit@v2
with:
bootstrap: vendor/autoload.php
configuration: phpunit.xml
At first time, it return an error on "Run php-actions/composer@v5". The log said:
Successfully tagged docker.pkg.github.com/isaacmsl/ez-action/php-actions_composer_ez-action:php-latest-build2
The push refers to repository [docker.pkg.github.com/isaacmsl/ez-action/php-actions_composer_ez-action]
e6df99478f76: Preparing
[...]
8fe0a997b1cf: Preparing
[...]
8fe0a997b1cf: Waiting
[...]
cb381a32b229: Waiting
83b32e5508b0: Retrying in 5 seconds
[...]
e6df99478f76: Retrying in 4 seconds
8886df9fe953: Pushed
5c78d57ff020: Retrying in 4 seconds
[...]
04eb62f9289c: Retrying in 1 second
8fe0a997b1cf: Pushed
[...]
83b32e5508b0: Pushed
unknown blob
Error: Process completed with exit code 1.
Please help me
Log (https://github.com/LastDragon-ru/tmp-phpunit-workflow/runs/1790193993?check_suite_focus=true)
Run php-actions/composer@v5
with:
command: update
php_version: 7.4
php_extensions: intl
version: latest
interaction: no
dev: yes
progress: no
quiet: no
Building PHP 7.4 with extensions: intl ...
cat: 'D:atmp-phpunit-workflowtmp-phpunit-workflow/output.log': No such file or directory
Error: Process completed with exit code 1.
Please do not encourage users to cache vendor directory.
path: vendor/
It makes CI unpredictable.
BTW ::set-output
is unused in README.
Complains of this
cat: /home/runner/work/xyz/project/output.log: No such file or directory
XXX requires php ~7.1.3||~7.2.0 -> your PHP version (7.4.5) does not satisfy that requirement.
Is it possible to specify somehow?
The only way to change php or composer version now is by using environment variables.
It would be nice to have action arguments for that.
So I tried pairing this with the github actions for wordpress plugin deployment and it seems that the vendor folder never comes out the other side of this action... It created a commit that deleted the folder stopping the plugin from working
https://github.com/Lewiscowles1986/WordPressSVGPlugin/runs/1294128965?check_suite_focus=true
I had to change:
- uses: php-actions/composer@v1
to
- uses: php-actions/composer@master
I also tried @1.0.0
with no luck.
I started getting this error since v5 was updated. Before the update, I was receiving the cloning private repository error that was fixed.
denied: Resource not accessible by integration
Also another error in the console:
Error response from daemon: manifest for docker.pkg.github.com/myorganization/mywebsite.com/php-actions_composer_mywebsite.com:php-7.4-build2 not found: manifest unknown: Docker image reference php-actions_composer_mywebsite.com:php-7.4-build2 not found under repo "myorganization"
If I execute my build on v4 everything runs correctly.
Hi! I'm receiving the error denied: Resource not accessible by integration
when composer is setting up. What's actually weird is that the one on the forked repo works just fine. Only the main repo is experiencing that error.
Not really sure what happened. The workflow file came from the forked repo and just got merged into the main repo yesterday. So today was the first time the workflow ran in the main repo. Was wondering if that would have any effect on the build steps.
Here are the logs from the main repo on when the composer github actions is triggered
Run php-actions/composer@v6
with:
version: latest
php_version: latest
command: install
interaction: no
dev: yes
progress: no
quiet: no
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/tawk-url-utils/tawk-url-utils/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/tawk-url-utils/tawk-url-utils/output.log ; echo "::endgroup::" ; exit 1; }
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
ACTION_VERSION: latest
ACTION_PHP_VERSION: latest
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:
ACTION_MEMORY_LIMIT:
Building PHP latest 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/tawk/tawk-url-utils/php-actions_composer_tawk-url-utils:php-latest-build2
Error response from daemon: repository docker.pkg.github.com/tawk/tawk-url-utils/php-actions_composer_tawk-url-utils not found: name unknown: docker package "php-actions_composer_tawk-url-utils" does not exist under owner "tawk/tawk-url-utils"
Dockerfile:
FROM php:cli-alpine
RUN apk add --update --no-cache zip git bash openssh
Sending build context to Docker daemon 213.5kB
Step 1/2 : FROM php:cli-alpine
cli-alpine: Pulling from library/php
a0d0a0d46f8b: Already exists
153eea49496a: Pulling fs layer
11efd0df1fcb: Pulling fs layer
b3f3214c344d: Pulling fs layer
9abd2f85688c: Pulling fs layer
83d85b95eb4c: Pulling fs layer
923d73ddadfa: Pulling fs layer
711b5c4b02a7: Pulling fs layer
ee08fa481788: Pulling fs layer
9abd2f85688c: Waiting
83d85b95eb4c: Waiting
923d73ddadfa: Waiting
711b5c4b02a7: Waiting
ee08fa481788: Waiting
11efd0df1fcb: Verifying Checksum
11efd0df1fcb: Download complete
b3f3214c344d: Verifying Checksum
b3f3214c344d: Download complete
153eea49496a: Verifying Checksum
153eea49496a: Download complete
83d85b95eb4c: Verifying Checksum
83d85b95eb4c: Download complete
153eea49496a: Pull complete
9abd2f85688c: Verifying Checksum
9abd2f85688c: Download complete
11efd0df1fcb: Pull complete
923d73ddadfa: Verifying Checksum
923d73ddadfa: Download complete
b3f3214c344d: Pull complete
711b5c4b02a7: Verifying Checksum
711b5c4b02a7: Download complete
9abd2f85688c: Pull complete
ee08fa481788: Verifying Checksum
ee08fa481788: Download complete
83d85b95eb4c: Pull complete
923d73ddadfa: Pull complete
711b5c4b02a7: Pull complete
ee08fa481788: Pull complete
Digest: sha256:6d339aec418226dd8f7fa0c460e3cb805aa11cc6939b0f90cd418eb17bf3343d
Status: Downloaded newer image for php:cli-alpine
---> e4af64d038e1
Step 2/2 : RUN apk add --update --no-cache zip git bash openssh
---> Running in 6dc134cc9949
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/14) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
(2/14) Installing expat (2.4.1-r0)
(3/14) Installing pcre2 (10.36-r0)
(4/14) Installing git (2.32.0-r0)
(5/14) Installing openssh-keygen (8.6_p1-r3)
(6/14) Installing libedit (20210216.3.1-r0)
(7/14) Installing openssh-client-common (8.6_p1-r3)
(8/14) Installing openssh-client-default (8.6_p1-r3)
(9/14) Installing openssh-sftp-server (8.6_p1-r3)
(10/14) Installing openssh-server-common (8.6_p1-r3)
(11/14) Installing openssh-server (8.6_p1-r3)
(12/14) Installing openssh (8.6_p1-r3)
(13/14) Installing unzip (6.0-r9)
(14/14) Installing zip (3.0-r9)
Executing busybox-1.33.1-r3.trigger
OK: 32 MiB in 46 packages
Removing intermediate container 6dc134cc9949
---> 7d2849b01b8a
Successfully built 7d2849b01b8a
Successfully tagged docker.pkg.github.com/tawk/tawk-url-utils/php-actions_composer_tawk-url-utils:php-latest-build2
The push refers to repository [docker.pkg.github.com/tawk/tawk-url-utils/php-actions_composer_tawk-url-utils]
a72d32fd3f4a: Preparing
35f0f82afc9e: Preparing
c06d56e0b756: Preparing
e8e62190e69f: Preparing
ff173f43caae: Preparing
f45ea13356bd: Preparing
f9955f53e306: Preparing
366fd11383f1: Preparing
8c323230b3b1: Preparing
e2eb06d8af82: Preparing
f45ea13356bd: Waiting
f9955f53e306: Waiting
366fd11383f1: Waiting
8c323230b3b1: Waiting
e2eb06d8af82: Waiting
denied: Resource not accessible by integration
Error: Process completed with exit code 1.
Hello,
thanks in advance for support, I'm quite new of github actions and I was trying to archieve a simple checkout of my private repo, in order to copy to a VPS.
I archieved it about 10 days ago, using your php-actions/composer@v5 but today, when I tried to run the actions (after adding just a few lines in my project) I had a totally different execution of your action that ended with this:
unknown blob
Error: Process completed with exit code 1.
I tried also to rollback commit and running same execution but no luck.
How can I solve?
Thanks!
As of this PR, all the builds now point to Composer v2 regardless of what version of this repo was specified.
See https://github.com/andig/carddav2fb/pull/220/checks?check_run_id=1581471294 for an example. The installation of the action (not the actual dependencies) takes 2 minutes alone. Not sure if I've misconfigured, but installing the action should be more or less instantaneous?
The default version is now 8, right?
We've been running against the v5
tag for at least a month, and suddenly all our builds started failing with errors on accessing private repos. Looking at the repo, it looks like the v5
tag is only a couple of days old now. Did the old tag got deleted and re-tagged on another sha?
Line 61 in 01e439f
Once a successful pull happens, there is no need to spend the few seconds attempting to build and push the image again.
Thank you for this nice GitHub action! It worked great until recently when I use:
- name: Install dependencies
uses: php-actions/composer@v5
with:
php_version: 7.4
version: 2
I get:
Run php-actions/composer@v5
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/qownnotes/api/php-actions_composer_api:php-7.4-build2
WARNING: ⚠️ Failed to pull manifest by the resolved digest. This registry does not
appear to conform to the distribution registry specification; falling back to
pull by tag. This fallback is DEPRECATED, and will be removed in a future
release. Please contact admins of https://docker.pkg.github.com. ⚠️
php-7.4-build2: Pulling from qownnotes/api/php-actions_composer_api
4c0d98bf9879: Pulling fs layer
ed03eff2d636: Pulling fs layer
fa67667da1de: Pulling fs layer
6961b2fabe93: Pulling fs layer
939a5b1ba662: Pulling fs layer
f326b7215c3e: Pulling fs layer
8339edb3b7db: Pulling fs layer
771201734758: Pulling fs layer
5b747590f2e3: Pulling fs layer
87664f078628: Pulling fs layer
6961b2fabe93: Waiting
939a5b1ba662: Waiting
f326b7215c3e: Waiting
771201734758: Waiting
5b747590f2e3: Waiting
87664f078628: Waiting
8339edb3b7db: Waiting
fa67667da1de: Verifying Checksum
fa67667da1de: Download complete
ed03eff2d636: Verifying Checksum
ed03eff2d636: Download complete
6961b2fabe93: Verifying Checksum
6961b2fabe93: Download complete
4c0d98bf9879: Download complete
4c0d98bf9879: Pull complete
f326b7215c3e: Verifying Checksum
f326b7215c3e: Download complete
ed03eff2d636: Pull complete
fa67667da1de: Pull complete
939a5b1ba662: Verifying Checksum
939a5b1ba662: Download complete
6961b2fabe93: Pull complete
771201734758: Verifying Checksum
771201734758: Download complete
939a5b1ba662: Pull complete
f326b7215c3e: Pull complete
8339edb3b7db: Verifying Checksum
8339edb3b7db: Download complete
5b747590f2e3: Verifying Checksum
5b747590f2e3: Download complete
87664f078628: Verifying Checksum
87664f078628: Download complete
8339edb3b7db: Pull complete
771201734758: Pull complete
5b747590f2e3: Pull complete
87664f078628: Pull complete
Digest: sha256:3a57167d9218135c4438354da850b15c6c844a3f0ad9ea3ff1b4968325133725
Status: Downloaded newer image for docker.pkg.github.com/qownnotes/api/php-actions_composer_api:php-7.4-build2
docker.pkg.github.com/qownnotes/api/php-actions_composer_api:php-7.4-build2
Docker tag: docker.pkg.github.com/qownnotes/api/php-actions_composer_api:php-7.4-build2
Error: Process completed with exit code 1.
(See https://github.com/qownnotes/api/runs/2278527522?check_suite_focus=true)
Retrying the build process doesn't help.
Did anyone else see this?
I can't specify the path where my composer.json file is located.
Hy everyone!
In my repository, composer.json isn't on the root level. I have somelike that:
- another_folder
- configs.file
- src
- [...]
- composer.json
When I set working_dir on my actions to working_dir: ./src, I received:
Warning: Unexpected input(s) 'working_dir', valid inputs are ['entryPoint', 'args', 'command', 'only_args', 'interaction', 'suggest', 'dev', 'progress', 'quiet', 'ssh_key', 'ssh_key_pub', 'ssh_domain']
But, in https://github.com/php-actions/composer/blob/master/action.yml we have the specification between lines 54 and 56:
working_dir: description: Use the given directory as working directory required: false
Im unsure about what will be behavior expected from that parameter. Maybe just Im in wrong way.
Thanks in advanced!
Hey,
I’m using following workflow to run my phpunit tests:
name: Pull Request
on: [pull_request]
jobs:
phpunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v6
with:
php_version: 7.4
version: 2
- run: composer test
When I print out php version inside tests with phpversion()
or PHP_VERSION
, the output is 8.0.12
. I created a test print here, see "Run composer test" step. Am I using this action wrong or is it something in your action?
I tried running composer test
with php-actions/composer@v1 and @v2, and in both cases I got this error:
Command: composer test --no-interaction --no-suggest --no-progress
Error: The "--no-suggest" option does not exist.
I get the same version on my local compose in versions 1.9 and 2.0.6.
I'm buffled as to why actions try to run compoer with invalid arguments?
It is possible to validate composer.json
by using the command composer validate
.
Using it in a workflow like:
- name: Validate composer.json
uses: php-actions/composer@v2
with:
command: validate
Will fail with this error:
Command: composer validate --no-interaction --no-suggest --no-progress
[Symfony\Component\Console\Exception\RuntimeException]
The "--no-suggest" option does not exist.
validate [--no-check-all] [--no-check-lock] [--no-check-publish] [-A|--with-dependencies] [--strict] [--] [<file>]
I get a failure in the set up stage with a 404 error, I copied the example config from https://github.com/g105b/phpspec-example. Did I do some thing wrong?
Failed run ::
https://github.com/chris-kruining/utilities/commit/eb7d6b915f877e60884fd20c323edaf4ecf85d1a/checks?check_suite_id=315904163
It would be great if this action could be working locally with ACT so you can avoid the cumbersome commit-push verification.
For the moment this is the error message I receive:
[Code verification/build] ❌ Failure - Install dependencies
Error: The runs.using key in action.yml must be one of: [docker node12], got composite
I think I have found a bug where this action overwrites my Dockerfile when building it's own Dockerfile. My Dockerfile exists in the root of the project and from looking at the source code this action appears to overwrite it.
I always get a fail on my first run when using this action when trying to run tests. This appears to be caused when I try to build my own Dockerfile, though instead of building my Dockerfile it appears it builds this actions Dockerfile instead which is why my tests fail.
To test this I make sure this actions container has been cleared before running the action by going into the repos packages page, selecting the generated container, then clicking on Package settings and deleting it. Then upon running my workflow again it will fail because of this conflict. Subsequent reruns of the workflow do not fail as the image already exists.
I wonder if this could be fixed by writing the Dockerfile to a temp directory or even just piping it to stdin: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#pipe-dockerfile-through-stdin
I am getting the following error while trying to install my packages.
Pulling docker.pkg.github.com/company/project/php-actions_composer_project:php-7.4-build2
Error response from daemon: received unexpected HTTP status: 503 Service Unavailable
- name: Install dependencies
uses: php-actions/composer@v6
with:
ssh_key: ${{ secrets.ssh_key }}
ssh_key_pub: ${{ secrets.ssh_key_pub }}
php_version: 7.4
args: --profile --ignore-platform-reqs
Trying to get this action working, but I'm seeing "Resource not accessible by integration" errors on every build.
Neither of the fixes mentioned in #39 and #66 worked for me.
Successfully built 165ada25111a
Successfully tagged docker.pkg.github.com/my-org/my-repo/php-actions_composer_my-repo:php-latest-build2
The push refers to repository [docker.pkg.github.com/my-org/my-repo/php-actions_composer_my-repo]
7eba071b370c: Preparing
912d9c054022: Preparing
9310d54608c1: Preparing
5a02989682c4: Preparing
503898301ef3: Preparing
df2f9abed396: Preparing
dcd0ffda58b8: Preparing
c29d319c8043: Preparing
8a76a297762e: Preparing
8d3ac3489996: Preparing
df2f9abed396: Waiting
dcd0ffda58b8: Waiting
c29d319c8043: Waiting
8a76a297762e: Waiting
8d3ac3489996: Waiting
denied: Resource not accessible by integration
Error: Process completed with exit code 1.
This is running on a private repo, using the push
event, with the following config:
- name: Install dependencies
uses: php-actions/composer@v6
with:
args: --prefer-dist --no-interaction --no-progress --working-dir=./path/to/subdirectory
I've experienced this issue by running following 2-steps-job on the self-hosted runner:
steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v4
I've managed to debug this issue and it is happening because actions/checkout
cannot reset the state of the workdir, which is caused by php-actions/composer
running as root:root. However,actions/checkout
is being run by the same user who "owns" the self-hosted runner (non-root user).
Greetings!
I'm trying to run the following wp-cli command:
- name: Install composer dependencies and generate pot file
uses: php-actions/composer@v5
with:
command: exec wp i18n make-pot ${{github.workspace}} ${{github.workspace}}/languages/give.pot
The command fails, however, as the --no-interaction flag:
Command: composer exec wp i18n make-pot /home/runner/work/givewp/givewp /home/runner/work/givewp/givewp/languages/give.pot --no-interaction
Error: Process completed with exit code 1.
I suspect the assumption is that the command is a native composer command, and not the exec command. So an exception probably needs to be made for the exec command to not add any additional flags.
When using version 5, the cloning of my private repository fails with message:
[RuntimeException]
Failed to execute git clone --mirror '[email protected]:organisation/private-package.git' '/tmp/composer-cache/vcs/git-bitbucket.org-organisation-private-package.git/'
Cloning into bare repository '/tmp/composer-cache/vcs/git-bitbucket.org-organisation-private-package.git'...
ssh -i ~/.ssh/action_rsa: line 1: ssh: not found
fatal: Could not read from remote repository.
Action source code:
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: php-actions/composer@v5
with:
php_version: 7.4
composer_version: 1
ssh_key: ${{ secrets.SSH_KEY }}
ssh_key_pub: ${{ secrets.SSH_KEY_PUB }}
This issue is not happening when using v4 where it works fine.
Also, the composer_version
argument seems to be not supported anymore, but still is an option according to the README.
Warning: Unexpected input(s) 'composer_version', valid inputs are ['version', 'php_version', 'php_extensions', 'command', 'only_args', 'interaction', 'dev', 'progress', 'quiet', 'args', 'ssh_key', 'ssh_key_pub', 'ssh_domain', 'working_dir']
The solution to pull down a private repo is working great, but my problem is that since Github does not allow you to share deploy keys across repos, this solution is only working if you have a single private repository.
Is is possible to supply ssh_key
more than once?
I might be missing something about how to re-use a public key as a deploy key, but at the moment I don't see it.
Somehow running composer install is currently not working?
My config:
- name: Install dependencies
uses: php-actions/composer@v6
with:
ssh_key: ${{ secrets.ssh_key }}
ssh_key_pub: ${{ secrets.ssh_key_pub }}
php_version: 7.4
version: 2
args: --profile --ignore-platform-reqs
Error-Log:
Run php-actions/composer@v6
with:
php_version: 7.4
version: 2
args: --profile --ignore-platform-reqs
command: install
interaction: no
dev: yes
progress: no
quiet: no
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/di-typo3/di-typo3/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/di-typo3/di-typo3/output.log ; echo "::endgroup::" ; exit 1; }
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
ACTION_VERSION: 2
ACTION_PHP_VERSION: 7.4
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: --profile --ignore-platform-reqs
ACTION_SSH_KEY:
ACTION_SSH_KEY_PUB:
ACTION_SSH_DOMAIN:
ACTION_WORKING_DIR:
ACTION_MEMORY_LIMIT:
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/bergwerk/di-typo3/php-actions_composer_di-typo3:php-7.4-build2
php-7.4-build2: Pulling from bergwerk/di-typo3/php-actions_composer_di-typo3
a0d0a0d46f8b: Already exists
153eea49496a: Pulling fs layer
11efd0df1fcb: Pulling fs layer
b3f3214c344d: Pulling fs layer
39841fde121a: Pulling fs layer
b391f58f02a2: Pulling fs layer
d683414984c6: Pulling fs layer
b5ec125c3128: Pulling fs layer
45f685e0ebe6: Pulling fs layer
451b18210adb: Pulling fs layer
39841fde121a: Waiting
b391f58f02a2: Waiting
d683414984c6: Waiting
b5ec125c3128: Waiting
45f685e0ebe6: Waiting
451b18210adb: Waiting
11efd0df1fcb: Verifying Checksum
11efd0df1fcb: Download complete
153eea49496a: Verifying Checksum
153eea49496a: Download complete
b3f3214c344d: Verifying Checksum
b3f3214c344d: Download complete
b391f58f02a2: Verifying Checksum
b391f58f02a2: Download complete
153eea49496a: Pull complete
39841fde121a: Verifying Checksum
39841fde121a: Download complete
d683414984c6: Verifying Checksum
d683414984c6: Download complete
b5ec125c3128: Verifying Checksum
b5ec125c3128: Download complete
11efd0df1fcb: Pull complete
b3f3214c344d: Pull complete
45f685e0ebe6: Verifying Checksum
45f685e0ebe6: Download complete
39841fde121a: Pull complete
b391f58f02a2: Pull complete
451b18210adb: Verifying Checksum
451b18210adb: Download complete
d683414984c6: Pull complete
b5ec125c3128: Pull complete
45f685e0ebe6: Pull complete
451b18210adb: Pull complete
Digest: sha256:c5389009a2843ed48a30da1b5a6d456371d54d7abc2e9aee92a89e2d8527a595
Status: Downloaded newer image for docker.pkg.github.com/bergwerk/di-typo3/php-actions_composer_di-typo3:php-7.4-build2
docker.pkg.github.com/bergwerk/di-typo3/php-actions_composer_di-typo3:php-7.4-build2
Docker tag: docker.pkg.github.com/bergwerk/di-typo3/php-actions_composer_di-typo3:php-7.4-build2
Error: Process completed with exit code 1.
Is it possible to install PHP extensions using this action? E.g.
...
- name: Install depenedencies
uses: php-actions/composer@v1
with:
extensions: exif
...
I attempted to use a custom command with arguments:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "install --working-dir ./submodule --no-suggest --prefer-dist" is not defined.
The step configuration:
- name: Install PHP dependencies
uses: php-actions/composer@v1
with:
command: install
args: --working-dir ./submodule --no-suggest --prefer-dist
Being able to use php-actions/composer with arguments would be nicer than our current workflow including shivammathur/setup-php, as this is a self-contained Docker action.
Note: I've had to redact the actual --working-dir
value because the example is taken from an internal project at work, but the directory name should be irrelevant.
I have a composer.json that required redis extension installed and enabled.
But the composer install was failed because no redis extension installed.
How can I add the extension?
Thanks.
As you can see here seems to be enabled the xdebug extension. I think it is better to disable it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.