php-actions / composer

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

Failed during Gitea workflow with no output #114

Open serious-angel opened 7 months ago

serious-angel commented 7 months ago

Dear Developers,

Thank you very much for the awesome project!

Considering a self-hosted Gitea instance, and tried both the current version and a fork specifically for Gitea, the following error happens:

Using the current ``` ... ⭐ Run Main set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/php-actions-composer@v6.1.2/composer-action.bash Writing entry to tarball workflow/outputcmd.txt len:0 Writing entry to tarball workflow/statecmd.txt len:0 Writing entry to tarball workflow/pathcmd.txt len:0 Writing entry to tarball workflow/envs.txt len:0 Writing entry to tarball workflow/SUMMARY.md len:0 Extracting content to '/var/run/act' expression 'set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n${{ github.action_path }}/composer-action.bash\n' rewritten to 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' evaluating expression 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' expression 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' evaluated to '%!t(string=set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/php-actions-composer@v6.1.2/composer-action.bash\n)' Wrote command \n\nset -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/php-actions-composer@v6.1.2/composer-action.bash\n\n\n to 'workflow/0-composite-composer_run.sh' Writing entry to tarball workflow/0-composite-composer_run.sh len:182 Extracting content to '/var/run/act' 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0-composite-composer_run.sh] user= workdir= Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0-composite-composer_run.sh]' Working directory '/workspace/project/main-website' ❌ Failure - Main set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/php-actions-composer@v6.1.2/composer-action.bash ```
Using the fork ``` ... ⭐ Run Main set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/https---github.com-sillyguodong-composer@gitea/composer-action.bash Writing entry to tarball workflow/outputcmd.txt len:0 Writing entry to tarball workflow/statecmd.txt len:0 Writing entry to tarball workflow/pathcmd.txt len:0 Writing entry to tarball workflow/envs.txt len:0 Writing entry to tarball workflow/SUMMARY.md len:0 Extracting content to '/var/run/act' expression 'set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n${{ github.action_path }}/composer-action.bash\n' rewritten to 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' evaluating expression 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' expression 'format('set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n{0}/composer-action.bash\n', github.action_path)' evaluated to '%!t(string=set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/https---github.com-sillyguodong-composer@gitea/composer-action.bash\n)' Wrote command \n\nset -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/https---github.com-sillyguodong-composer@gitea/composer-action.bash\n\n\n to 'workflow/0-composite-composer_run.sh' Writing entry to tarball workflow/0-composite-composer_run.sh len:201 Extracting content to '/var/run/act' 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0-composite-composer_run.sh] user= workdir= Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/0-composite-composer_run.sh]' Working directory '/workspace/project/main-website' ❌ Failure - Main set -e\nbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/v2.2.0/php-build.bash) composer\n/var/run/act/actions/https---github.com-sillyguodong-composer@gitea/composer-action.bash ```

Workflow file ```yaml name: 'Test Workflow' on: push: branches: - 'test' jobs: deploy-job: name: 'Build' runs-on: 'ubuntu-latest' steps: - name: 'Composer' # @see https://github.com/marketplace/actions/composer-php-actions#passing-arguments uses: 'php-actions/composer@v6.1.2' with: php_version: '8.3' - name: 'Node' run: | npm i; npm run build; ```

There's a relevant issue nektos/act/issues#1228, but I am still not sure what is the exact issue causer, since there's no output from the step which uses the action:

Git_2024-03-31_13-32-27_Z_74Lkk31A

What might it be?

Best and kind regards

inta commented 4 months ago

That may be a problem with php-actions/php-build which is called from php-actions/composer. That action tries to do a docker login which is not provided by the default Gitea/Forgejo runner images (and actions are run inside a container by default there, not on the host machine). I tried some other images but so far it did not work for me. :(

g105b commented 4 months ago

Hey, I'll take a look at this when I'm back at my computer. Looks interesting and I would like to support the Gitea project if possible.