Skip to content

Commit 7d29277

Browse files
fix: add retry mechanism for build step in CI pipeline with cache reset
1 parent fddc17d commit 7d29277

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/push.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,16 @@ jobs:
4343
continue-on-error: true
4444

4545
- name: Build libraries
46+
id: build
4647
run: npx nx affected -t build
48+
continue-on-error: true
49+
50+
- name: Retry build with cache reset
51+
if: steps.build.outcome == 'failure'
52+
run: |
53+
echo "Build failed, resetting NX cache and retrying..."
54+
npx nx reset
55+
npx nx affected -t build --skip-nx-cache
4756
4857
- name: Test libraries
4958
run: npx nx affected -t test --passWithNoTests

0 commit comments

Comments
 (0)