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

Cannot setup job on self hosted runner #31

Closed
LucBerge opened this issue Nov 13, 2023 · 7 comments · Fixed by #33
Closed

Cannot setup job on self hosted runner #31

LucBerge opened this issue Nov 13, 2023 · 7 comments · Fixed by #33

Comments

@LucBerge
Copy link
Contributor

Hello,

I am having an issue using the action on a self-hosted runner. The job has not even started it fails at the Set up job step:

Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483' (SHA:e9a478b16159b4d31420099ba146cdc50f134483)
Error: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node20' 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)
Error: Fail to load schneegans\dynamic-badges-action\e9a478b16159b4d31420099ba146cdc50f134483\action.yml

I have node18 installed.

@Schneegans
Did you try to run the action on a self-hosted runner?
If yes, what node version?

@LucBerge
Copy link
Contributor Author

I am trying to verify #14, I am behind a proxy

@Schneegans
Copy link
Owner

Schneegans commented Nov 14, 2023

Well, the node version was bumped as part of #25. I think there is no requirement to use node 20 (except for that GitHub recommends it). I just pushed a branch test/node16 which uses the older node version. Do you want to test this instead? Like this: uses: schneegans/dynamic-badges-action@test/node16.

@LucBerge
Copy link
Contributor Author

LucBerge commented Nov 14, 2023

Do you want to test this instead? Like this: uses: schneegans/dynamic-badges-action@test/node16.
I will try.

Can you run your action (master branch) on a self hosted runner to see what you have?

@Schneegans
Copy link
Owner

Yeah, I can test this later today!

@LucBerge
Copy link
Contributor Author

LucBerge commented Nov 14, 2023

For some reasons, it is working with branch test/node16. But in order to make it compatible, you must:

  • Install node-fetch:
npm install node-fetch
  • Add in index.js:
import fetch from "node-fetch";
import { Headers } from "node-fetch";

The problem with this line (action.yml)

using: "node20"

is that you force your action to run with node20 only.
Current self-hosted runners use node16.
So when my runner set up the job, it fails because your action force to use node20. I cannot install node20 using the setup-node action because it fails before.

@LucBerge
Copy link
Contributor Author

LucBerge commented Nov 14, 2023

@Schneegans I think, if you want to make your action compatible with enterprise and/or self-hosted runners, you must downgrade to node16 because this is the latest supported node version for github runners.

Looks like most of the actions uses node16. Maybe for self-hosted runner compatibility!?

https://github.com/marketplace?category=&query=&type=actions&verification=
https://github.com/search?q=%22using%3A+node%22+path%3A**%2Faction.yml&type=code

@LucBerge
Copy link
Contributor Author

LucBerge commented Nov 14, 2023

Regarding this post, Github is moving from node16 to node20 and And self-hosted runners are at version 2.311.0 but not for companies.


What happened

The current version of my Github Enterprise is 3.10.2.
In this version, when I want to setup a runner, It ask me to install runner version 2.304.0 from my company source. I guess this is a special runner compatible with my company only.
Your action runs on node20 which is not compatible with the current enterprise runner I have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants