diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index ad9744b12d..cea02fec90 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -14,6 +14,7 @@ jobs: env: CI: true + BACKSTAGE_CACHE_DIR: /.backstage-build-cache steps: - uses: actions/checkout@v2 @@ -29,11 +30,13 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: cache node_modules/.cache + - name: cache build cache uses: actions/cache@v1 with: - path: node_modules/.cache - key: node_modules-cache + path: .backstage-build-cache + key: build-cache-${{ github.sha }} + restore-keys: | + build-cache- - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 9a1791a594..1b08426d29 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -14,6 +14,7 @@ jobs: env: CI: true + BACKSTAGE_CACHE_DIR: /.backstage-build-cache steps: - uses: actions/checkout@v2 @@ -27,11 +28,13 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: cache node_modules/.cache + - name: cache build cache uses: actions/cache@v1 with: - path: node_modules/.cache - key: node_modules-cache + path: .backstage-build-cache + key: build-cache-${{ github.sha }} + restore-keys: | + build-cache- - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: