diff --git a/.github/workflows/actions/install-node-modules/action.yml b/.github/workflows/actions/install-node-modules/action.yml index bbe47b41..cf87577e 100644 --- a/.github/workflows/actions/install-node-modules/action.yml +++ b/.github/workflows/actions/install-node-modules/action.yml @@ -52,30 +52,25 @@ runs: # Try and restore cache if it exists, then build assets only (no npm ci needed) - name: Restore dependencies - id: restore-dependencies - uses: actions/cache/restore@v3 + id: save-dependencies + uses: actions/cache@v3 with: path: ${{ steps.action-parameters.outputs.node-modules }} key: node-modules-${{ inputs.node_version }}-${{ hashFiles(inputs.package_locks) }} - name: Build assets only (dependencies came from cache) - if: steps.restore-dependencies.outputs.cache-hit == 'true' + if: steps.save-dependencies.outputs.cache-hit == 'true' run: ${{ join(fromJson(steps.action-parameters.outputs.build-command), ' & ') }} shell: bash - - name: Save dependencies - uses: actions/cache/save@v3 - with: - path: ${{ steps.action-parameters.outputs.node-modules }} - key: ${{ steps.restore-dependencies.outputs.cache-primary-key }} # If the cache was not restored we install npm, node_modules dependencies and then build the assets, then we save the cache - name: Setup Node ${{ inputs.node_version }} - if: steps.restore-dependencies.outputs.cache-hit != 'true' + if: steps.save-dependencies.outputs.cache-hit != 'true' uses: actions/setup-node@v3 with: node-version: ${{ inputs.node_version }} cache: 'npm' cache-dependency-path: ${{ inputs.package_locks }} - name: Install dependencies and build assets - if: steps.restore-dependencies.outputs.cache-hit != 'true' + if: steps.save-dependencies.outputs.cache-hit != 'true' run: ${{ join(fromJson(steps.action-parameters.outputs.install-command), ' & ') }} shell: bash