skills / write-javascript-actions

Write your own GitHub JavaScript Action and automate customized tasks unique to your workflow.
MIT License
118 stars 64 forks source link

[Bug]Node.js installation does not work as expected in local environment where ver.12 or 16 cannot be installed #10

Closed nshun583 closed 1 year ago

nshun583 commented 2 years ago

Describe the bug Step 6: Trigger the joke action will end up causing the error below

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node18' is not supported, use 'docker', 'node12' or 'node16' instead.')
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)

https://github.com/nshun583/writing-javascript-actions/actions/runs/3308162573

To Reproduce Steps to reproduce the behavior:

  1. Start the course of writing-javascript-actions in CentOS Stream 9 environment (for example)
  2. In Step 1: Initialize a new JavaScript project, install Node.js by following official document from dnf
  3. Doing so will only give learners to the option to go with ver.18
$ LANG=C;sudo dnf module list nodejs
Last metadata expiration check: 1:01:07 ago on Mon Oct 24 02:53:19 2022.
CentOS Stream 9 - AppStream
Name                    Stream                  Profiles                                                  Summary                           
nodejs                  18 [e]                  common [d] [i], development, minimal, s2i                 Javascript runtime                

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
  1. In later of the course, define ver.18 instead of 12 in .github/actions/joke-action/action.yml since it is the version can only be installed
    runs:
    using: "node18"
    main: "main.js"
    $ LANG=C;sudo dnf module install nodejs:12
    Last metadata expiration check: 1:24:00 ago on Mon Oct 24 02:53:19 2022.
    Error: Problems in request:
    missing groups or modules: nodejs:12
  2. When learners reached to Step 6: Trigger the joke action and Check the workflow results on the "Actions tab, they will face the error of
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node18' is not supported, use 'docker', 'node12' or 'node16' instead.')
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)

Expected behavior Since GitHub.Runner is still not supporting Node.js ver.18 as the environment variable, https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions Don't forget to set up your workstation section in Step 1: Initialize a new JavaScript project should notify learners not to install ver.18 and offer the way to intentionally install ver.12 or 16 with the alternative method

Screenshots None

Device information Any OS environment where the package management system (including the third-party one such as Homebrew in macOS) offers Node.js installation only of ver.18

Additional context None

chandu-r commented 1 year ago

first-joke

chandu-r commented 1 year ago

second-joke

heiskr commented 1 year ago

We've updated the dependencies on this repository, but let us know if you continue to see the error