mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #732] Node is not mounted into nested container #461
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#461
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wmmc88 on GitHub (Jun 9, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/732
Originally assigned to: @catthehacker on GitHub.
System information
act: catthehacker/ubuntu:full-20.04 (2b000fe702e8)actversion: act v0.2.23-0.20210609173016-6550eb7f2515 (installed initialled with go install github.com/nektos/act@master on go1.16.5)Expected behaviour
This should install node.
Actual behaviour
All 3 jobs fail to install node.
Workflow and/or repository
ci.ymlcontents:~/.actrccontents:Steps to reproduce
mkdir -p test_repo/.github/workflowstouch test_repo/.github/workflows/ci.ymland copy paste the above workflowcd test_repoact -v -j dummy_1act -v -j dummy_2act -v -j dummy_3actoutputLog
@catthehacker commented on GitHub (Jun 9, 2021):
dummy 1 and 2 are fixed by #726
dummy 3: your image needs nodeJS installed to work properly
@wmmc88 commented on GitHub (Jun 9, 2021):
Is this a requirement of
actor of github actions? I created a dummy repo to test it out and thedummy_3job works fine?https://github.com/wmmc88/test-repo/runs/2788192719
Since the
dummy_3is set toruns-on: ubuntu-latest, shouldn't it pick up-P ubuntu-latest=catthehacker/ubuntu:full-20.04from my.actrcand run the docker commands from within that image?I'm not really sure how js github actions work, but I'm don't understand why this executes fine on github's runners, but breaks in act
@catthehacker commented on GitHub (Jun 9, 2021):
Oh okay, I looked at workflow now and unfortunately, that's something I've yet to fix since GitHub mounts all tools into containers and we kind of do too but we don't have any tools in those paths thus it breaks
@catthehacker commented on GitHub (Jun 9, 2021):
Yes, but also you specify
container:in workflow which overrides where everything is executed and we don't support that well (yet)@kei-yamazaki commented on GitHub (Sep 14, 2021):
Do you have any updates on this Issue?
I am using "actions/checkout@v2" and "https://github.com/myoung34/docker-github-actions-runner" and am facing the same problem of node not found in PATH.
It will be difficult to support all the tools in the github-hosted runner, but I think it is desirable to support node first.
@catthehacker commented on GitHub (Sep 14, 2021):
You are using custom image, please contact image maintainer to include
node@kei-yamazaki commented on GitHub (Sep 14, 2021):
Thanks for the reply.
I am using a custom image, which already has node installed.
The custom image has already run the script to install the official github self-hosted runner, and I can actually run the same workflow successfully as a self-hosted runner.
You have marked my previous comment as off-topic, but I believe the essential problem is the same as this Issue.
I think the two issues are as follows.
Especially regarding No.1, I understand that it is technically difficult to support all the requirements of GitHub in act.
However, if the behavior is different between GitHub and act, that should be fixed by the act side.
@catthehacker commented on GitHub (Sep 15, 2021):
The issue is not the same. I marked your comment as off-topic since OP issue is with
actnot supportingcontainer:option and not with NodeJS (since other issue was already fixed).I have no idea of what's wrong since your description is vague without any useful information. Create new issue and follow the template.
@g3kk0 commented on GitHub (Feb 10, 2023):
Are there any updates on this? I really love this tool but without support for running things in containers without node makes using this very restrictive.
@Aeolun commented on GitHub (Mar 8, 2023):
Well, that put a damper on my enthusiasm. Happily start running my first workflow only to be greeted by 'node' doesn't exist for the... checkout action. Would you be open to pull requests for this?
@KnisterPeter commented on GitHub (Mar 8, 2023):
@Aeolun sure go ahead
@alexjorgef commented on GitHub (May 31, 2023):
Using this simple workflow I'm having the same issue (test A pass and test B fail):
From my understanding, when a GitHub Action for JavaScript defines the
runssyntax asactions/setup-nodedoes, the path for node runtime its located atruns-ondefinition and not oncontainer.Logs:
@beriberikix commented on GitHub (Oct 18, 2023):
Is this particular issue a matter of the base image not containing
node? Are there alternative images that do?@bestlinuxgamers commented on GitHub (Apr 23, 2024):
I did some reverse-engineering on how github provides node.
It seems that github includes a read-only docker volume under
/__e/in every container (even if the runtime is not used by any action).Each subfolder in this volume represents a runtime.
The following runtimes are currently available:
node16,node16_alpine,node20,node20_alpine.Now in the example of a Node-20 action, the following command is simply executed:
/__e/node20/bin/node /__w/_actions/<organization>/<action-name>/<tag>/<path-to-main>/main.jsBasically, node runs from the environment folder and gets the main class of the action as an argument.
To implement this, we would need:
node20/bin/node --example {path-to-action-main}"