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:
174
174
with :
175
175
path : ${{ env.CACHED_BUILD_PATHS }}
176
176
key : ${{ env.BUILD_CACHE_KEY }}
177
+
177
178
- name : NX cache
178
179
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')
179
187
with :
180
188
path : node_modules/.cache/nx
181
189
key : nx-${{ runner.os }}-${{ github.ref }}-${{ env.HEAD_COMMIT }}
@@ -185,6 +193,7 @@ jobs:
185
193
nx-${{ runner.os }}-${{ github.ref }}-${{ env.HEAD_COMMIT }}
186
194
nx-${{ runner.os }}-${{ github.ref }}
187
195
nx-${{ runner.os }}
196
+
188
197
- name : Build packages
189
198
# Under normal circumstances, using the git SHA as a cache key, there shouldn't ever be a cache hit on the built
190
199
# 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