PM2 reload <name> not being executed via github actions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
I am using github action to create a pipeline and using pm2 as the process manager.
pm2 reload server
When I run the above command locally the process is reloaded. When run it through action runner by running the bash command provided by github action that is - ./svc.sh
I get the following error:
0s
Run pm2 restart server
/actions-runner/_work/_temp/d8a0a9e1-465d-49aa-a242-6d80da54584f.sh: line 1: pm2: command not found
Error: Process completed with exit code 127.
However When I run it through ./run.sh the sequence of action including run pm2 reload server executes successfully.
Node: 12.X
Pm2: 4.5.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the GitHub Actions environment when invoked through ./svc.sh with the successful ./run.sh path, starting from the reported shell command and the pm2 command-not-found error. Done means the workflow can execute pm2 reload server through the service-runner path as it already does through ./run.sh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, node.js
- Domain
- ci-cd, cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100