AAE-12860-build errors on cron

skip nxcache exchange between jobs, changed node modules cache key
This commit is contained in:
Marco Carrozzo
2023-02-27 12:52:43 +01:00
committed by GitHub
parent 713320b01d
commit c890999c80
5 changed files with 21 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ inputs:
description: 'enable caching for node modules'
required: false
type: boolean
default: 'true'
default: 'true'
act:
description: 'enable act debug'
required: false
@@ -28,22 +28,6 @@ runs:
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@v1.29.0
# CACHE
- name: Node cache
id: node-cache
if: ${{ inputs.enable-cache == 'true' }}
uses: actions/cache@v3
env:
cache-name: node-cache
with:
path: |
~/.npm
nxcache
dist
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}-${{ steps.tag-sha.outputs.tag_sha }}
restore-keys: |
node-${{ runner.os }}-build-${{ env.cache-name }}-
node-${{ runner.os }}-build-
node-${{ runner.os }}-
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
@@ -53,11 +37,11 @@ runs:
with:
path: |
node_modules
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}-${{ steps.tag-sha.outputs.tag_sha }}
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@v3
if: ${{ inputs.enable-cache == 'true' }}