Skip to content
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

Exit code 125 and .gitconfig error #97

Open
shawnachieve opened this issue Feb 12, 2023 · 3 comments
Open

Exit code 125 and .gitconfig error #97

shawnachieve opened this issue Feb 12, 2023 · 3 comments

Comments

@shawnachieve
Copy link

shawnachieve commented Feb 12, 2023

This could entirely be an issue with Act and not this library as I've seen in the issue queue previous issues with Act. But I'd appreciate any guidance that can be offered on this error. I haven't been able to find any reference to an exitcode 125 in either this action source code or the composer source code. So I haven't been able to determine a root cause.

Thank you.

First some context:

  • I'm working on an workflow that will run "composer update" on our QA environment when code is updated in one of our module/library github repos.
  • My composer.json file pulls multiple modules/libraries from a private packagist repo with credentials stored in the COMPOSER_AUTH environment variable.
  • I'm testing this locally on the latest MacOS using the latest build of Act

Problem description:
The build fails with "exitcode '125' when running the simplest form of the action.

Prior to this error, there is the error message "The path /root/.gitconfig is not shared from the host and is not known to Docker." and "ERRO[0000] error waiting for container: context canceled"

Action Step code:
Here is the step code for the action. Note that I've stripped this down to the bare minimum for now to try to get anything to work.

      - name: "Update lock file"
        uses: php-actions/composer@v6
        env:
          COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
        with:
          php_version: "8.0"
          composer_version: latest
          ssh_key: ${{ secrets.SSH_KEY }}
          ssh_key_pub: ${{ secrets.SSH_KEY_PUB }}

Debug Output:
Here is the relevant output from the Act debug log:

[Update-Composer-Lock/update-composer-lock] [DEBUG] Extracting content to '/var/run/act'
[Update-Composer-Lock/update-composer-lock] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-composer_run.sh] user= workdir=
[Update-Composer-Lock/update-composer-lock] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-composer_run.sh]'
[Update-Composer-Lock/update-composer-lock] [DEBUG] Working directory '/Users/shawn.smiley/Documents/projects/psh/ab-dev-qa'
| Building PHP 8.0 with extensions: ...
| # github.com:22 SSH-2.0-babeld-c7c9be80
| # gitlab.com:22 SSH-2.0-GitLab-SSHD
| # bitbucket.org:22 SSH-2.0-conker_7e57468e48 40657e7a095a
| docker: Error response from daemon: Mounts denied:
| The path /root/.gitconfig is not shared from the host and is not known to Docker.
| You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.
| See https://docs.docker.com/desktop/mac for more info.
| ERRO[0000] error waiting for container: context canceled

[Update-Composer-Lock/update-composer-lock] ❌ Failure - Main set -e
bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b/php-build.bash) composer
/var/run/act/actions/php-actions-composer@v6/composer-action.bash
[Update-Composer-Lock/update-composer-lock] ⚙ ::set-output:: name=full_command::composer install --no-progress --no-interaction
[Update-Composer-Lock/update-composer-lock] exitcode '125': failure

[Update-Composer-Lock/update-composer-lock] [DEBUG] Loading revision from git directory
[Update-Composer-Lock/update-composer-lock] [DEBUG] Found revision: 3e295f05c2352715496f4d4d7cea063ea54fc6c7
[Update-Composer-Lock/update-composer-lock] [DEBUG] HEAD points to '3e295f05c2352715496f4d4d7cea063ea54fc6c7'
[Update-Composer-Lock/update-composer-lock] [DEBUG] using github ref: refs/heads/PBST-1093_gh_actions

@michaelachrisco
Copy link

Im having the same issue on a composer update after using - uses: php-actions/composer@v6

@dsentker
Copy link

I am having the same issue with Exit Code 125:

Run php-actions/composer@v6
  with:
    php_version: 7.4
    php_extensions: redis intl grpc zip dom curl libxml mbstring zip pcntl pdo sqlite pdo_sqlite bcmath soap intl gd exif iconv imagick
    version: [2](https://github.com/dsentker/XX/actions/runs/XXX/jobs/XXX#step:4:2).x
    command: install
    interaction: no
    dev: yes
    progress: no
    quiet: no
Run set -e
  set -e
  bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e[3](https://github.com/dsentker/XX/actions/runs/XXX/jobs/XXX#step:4:3)c56b/php-build.bash) composer
  /home/runner/work/_actions/php-actions/composer/v6/composer-action.bash
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ACTION_VERSION: 2.x
    ACTION_PHP_VERSION: 7.[4](https://github.com/dsentker/XX/actions/runs/XXX/jobs/XXX#step:4:4)
    ACTION_PHP_EXTENSIONS: redis intl grpc zip dom curl libxml mbstring zip pcntl pdo sqlite pdo_sqlite bcmath soap intl gd exif iconv imagick
    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_SSH_PORT: 
    ACTION_WORKING_DIR: 
    ACTION_MEMORY_LIMIT: 
  
Building PHP 7.4 with extensions: redis intl grpc zip dom curl libxml mbstring zip pcntl pdo sqlite pdo_sqlite bcmath soap intl gd exif iconv imagick ...
Error: Process completed with exit code 12[5](https://github.com/dsentker/XX/actions/runs/XXX/jobs/XXX#step:4:5).

@Sacquer
Copy link

Sacquer commented Sep 27, 2023

Try adding /root as directory under Resources/File sharing if you're using Docker Desktop.

bild

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

4 participants