Use node image from .nvmrc file


I want to use a node image that is specifed in the repo by a nvmrc file. How can i get this working?

kind: pipeline
name: default

  - name: nvm
    image: bash
      - cd public_html/content/themes/main/
      - echo export NODE=$(cat .nvmrc)

  - name: build
    image: node{{NODE}}
      - echo $NODE
      - cd public_html/content/themes/main/
      - npm i
      - npm run build


Try checking the syntax help docs here: Syntax | Drone

I think you’ll find you need something like image: node$${{NODE}} but i’ve not tested it.