shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.89k stars 337 forks source link

Changing node version to 20 broke compatibility with gitea runner #768

Closed jasonestewart closed 11 months ago

jasonestewart commented 11 months ago

Describe the bug The v2 ref now pulls node:20 - the gitea runner doesn't yet support node:20

The runs.using key in action.yml must be one of: [composite docker node12 node16 go], got node20 Version

Runners

Screenshots/Logs

  ☁  git clone 'https://github.com/shivammathur/setup-php' # ref=v2
  cloning https://github.com/shivammathur/setup-php to /home/jason/.cache/act/shivammathur-setup-php@v2
Cloned https://github.com/shivammathur/setup-php to /home/jason/.cache/act/shivammathur-setup-php@v2
Checked out v2
Read action <nil> from 'Unknown'
The runs.using key in action.yml must be one of: [composite docker node12 node16 go], got node20
skipping post step for 'Setup PHP'; step was not executed
skipping post step for 'Checkout'; step was not executed
Cleaning up services for job Lint
Cleaning up container for job Lint
Removed container: 2d3c734d2ec19bde6a0e644ff82bf88ef3c95de81932ea815a2b6ee22425b748
  🐳  docker volume rm GITEA-ACTIONS-TASK-1057_WORKFLOW-Lint_JOB-Lint
  🐳  docker volume rm GITEA-ACTIONS-TASK-1057_WORKFLOW-Lint_JOB-Lint-env
Cleaning up network for job Lint, and network name is: GITEA-ACTIONS-TASK-1057_WORKFLOW-Lint_JOB-Lint-network
🏁  Job failed

Works fine on @v1:

image

But am limited to PHP <= 8.0

Expected Behavior Hoping that a shift to a higher version of node could be made to a new version of the action (@v3) instead of changing the existing version

shivammathur commented 11 months ago

As a policy, unless there is a breaking change in the setup-php API we will not tag a major version. The node version was upgraded in v2 for various reasons I outlined here

Support for Node 20 should be added to the Gitea runner as Node 16 is deprecated.

jasonestewart commented 11 months ago

Hi, yes, I checked a bit further and saw your reply to someone else.

In case others stumble upon this, I wanted to add that as a pretty reasonable workaround, I was able to change the checkout to use a release tag:

  - name: Setup PHP
    uses: shivammathur/setup-php@2.25.5

And this works fine - thanks for tagging stuff so regularly and thanks, too, for such an incredible resource.