name: npm install inputs: runneros: required: true default: 'test' runs: using: "composite" steps: - uses: actions/checkout@v2 - name: Print inputs shell: bash run: | echo ${{ inputs.runneros }} # Save caches individually - name: Parent Cache id: parent-cache uses: actions/cache@v2 with: path: .//node_modules key: ${{ inputs.runneros }}-core-cache-${{ hashFiles('./package-lock.json') }} # Install separately depending on cache hit - name: Install Parent shell: bash if: steps.parent-cache.outputs.cache-hit != 'true' run: npm i