mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #86] Can't install npm dependencies #54
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#54
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 @finleygn on GitHub (Feb 20, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/86
I've been trying to get my github actions working locally with act (really cool tool btw) but I can't seem to get npm working.
Heres an example workflow to show the problem:
Running command
act -j do-stuff -s NPM_TOKEN=XXXX_XXXX_XXXXI get this output
In the verbose output the verbose output says
npm: command not foundwhich causes the exit.I thought maybe it was the same issue as #85 but after following @davidalger's steps the output was the same. (I'm also on macOS)
@fwilhe commented on GitHub (Feb 20, 2020):
Have you tried configuring another image? I had some (limited) success with
act -P ubuntu-latest=node:12. Might also depend on if you rely on the default node version or use the setup node action.I'm wondering about the default home dir
/github/workspace. Is this a leftover from the "old" actions? My understanding is that the "new" ones use/home/actions.@fwilhe commented on GitHub (Feb 20, 2020):
Interesting thing: In this repo https://github.com/SAP/project-piper-action
this job works
but this does not
It seems to fail in installing packages, I don't understand why.
@finleygn commented on GitHub (Feb 20, 2020):
If the Github action docs are up to date
/github/workspaceshould be finehttps://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#filesystems-on-github-hosted-runners
there was an update to the readme recently (
b48a0ef) saying to use the imageubuntu-latest=nektos/act-environments-ubuntu:18.04so will try that and see how it goes@finleygn commented on GitHub (Feb 20, 2020):
👏
Thanks for the image idea @fwilhe.
@finleygn commented on GitHub (Feb 20, 2020):
Although if there is a solution for a more lightweight image that would be cool as the install took about an hour ;-;
@KingDarBoja commented on GitHub (Feb 20, 2020):
If you don't have fast internet, this is gonna take way more than 1 hour 😆
@cplee commented on GitHub (Feb 21, 2020):
I think the issue is actually how I implemented the containers around steps that use actions. There is a separate step used for
runsteps andusessteps...this means anything you do in theusesstep isn't necessarily available in the laterrunstep.In your case,
setup-nodeinstalls NodeJS in a separate container from thenpm installstep.I'm guessing this is a misunderstanding on my part about how GitHub Actions works...is it your understanding that the
usessteps should NOT run in a separate container?@finleygn commented on GitHub (Feb 21, 2020):
not entirely sure but it was my understanding that uses steps can persist stuff
looking through https://github.com/actions/setup-go it seems like it just interacts directly with the runner?
@cplee commented on GitHub (Feb 21, 2020):
Alright, I have a plan:
catforENTRYPOINTdocker execinto that job container/githubpath that will be shared with the one-off containersWhat's a one-off container? Some steps will NOT run in the job container:
uses: docker://.....will have a one-off container with the job volume attacheduses: action/namewhereaction/namehas an action.yaml withruns.using == 'docker'will have a one-off container with the job volume attachedWill work on this in coming days on branch https://github.com/nektos/act/tree/ISS-86
@finleygn commented on GitHub (Feb 21, 2020):
looks solid
thanks a bunch :)