Is it possible specify npm and node version when using this action? #59
-
Getting the following error when running this action:
In my package.json, I have the node and npm versions specified as 6.14.13 and 14.16.0.
Is it possible to specific the node and npm versions when using this action |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, currently there is no option to specify custom node and npm version, because this action runs in docker container, where node and npm is set up. But, you can fork this repository, change Dockerfile and then use action from your repository. Your dockerfile in forked # Specify required node version
# ↓
FROM node:14
# Set up custom npm version, if you need
# ↓
# npm i -g [email protected]
COPY dist/index.js /index.js
ENTRYPOINT ["node", "/index.js"] Using action from forked repo: name: 'coverage'
on:
pull_request:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
# the "uses" value should point to your repository
# ↓
- uses: Freddie-Pike/jest-coverage-report-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }} You can use your custom action without publishing it, so you do not need to create release or configure other information. |
Beta Was this translation helpful? Give feedback.
Sorry, currently there is no option to specify custom node and npm version, because this action runs in docker container, where node and npm is set up. But, you can fork this repository, change Dockerfile and then use action from your repository.
Your dockerfile in forked
jest-coverage-report-action
repo should look like this:Using action from forked repo: