File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -174,8 +174,16 @@ jobs:
174174 with :
175175 path : ${{ env.CACHED_BUILD_PATHS }}
176176 key : ${{ env.BUILD_CACHE_KEY }}
177+
177178 - name : NX cache
178179 uses : actions/cache@v3
180+ # Disable cache when:
181+ # - on master
182+ # - on release branches
183+ # - when PR has `ci-skip-cache` label
184+ if :
185+ github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/release/') &&
186+ !github.event.pull_request.labels.contains('ci-skip-cache')
179187 with :
180188 path : node_modules/.cache/nx
181189 key : nx-${{ runner.os }}-${{ github.ref }}-${{ env.HEAD_COMMIT }}
@@ -185,6 +193,7 @@ jobs:
185193 nx-${{ runner.os }}-${{ github.ref }}-${{ env.HEAD_COMMIT }}
186194 nx-${{ runner.os }}-${{ github.ref }}
187195 nx-${{ runner.os }}
196+
188197 - name : Build packages
189198 # Under normal circumstances, using the git SHA as a cache key, there shouldn't ever be a cache hit on the built
190199 # packages, and so `yarn build` should always run. This `if` check is therefore only there for testing CI issues
You can’t perform that action at this time.
0 commit comments