Skip to content

Commit 88da0cc

Browse files
Merge pull request #117 from aligent/fix/DO-1765-fetch-all-if-nx
fix DO-1765: fetch all from origin if nx
2 parents 2c11612 + 8f6a7ec commit 88da0cc

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/node-pr.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ jobs:
207207
with:
208208
fetch-depth: ${{ inputs.fetch-depth }}
209209
persist-credentials: false
210-
- name: Fetch Origin
211-
run: git fetch origin
212210
- name: Install Node.js
213211
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f #v6.3.0
214212
with:
@@ -275,6 +273,13 @@ jobs:
275273
INPUTS_PACKAGE_MANAGER: ${{ inputs.package-manager }}
276274
INPUTS_BUILD_COMMAND: ${{ inputs.build-command }}
277275

276+
- name: Fetch all commits for Nx
277+
if: steps.check-build.outputs.exists-script != 'true' && steps.check-build.outputs.exists-nx-target == 'true'
278+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
279+
with:
280+
fetch-depth: 0
281+
persist-credentials: false
282+
278283
- name: Build (nx)
279284
if: steps.check-build.outputs.exists-script != 'true' && steps.check-build.outputs.exists-nx-target == 'true'
280285
run: npx nx run-many -t ${INPUTS_BUILD_COMMAND} ${{ inputs.debug && '--verbose' || '' }}
@@ -311,8 +316,6 @@ jobs:
311316
with:
312317
fetch-depth: ${{ inputs.fetch-depth }}
313318
persist-credentials: false
314-
- name: Fetch Origin
315-
run: git fetch origin
316319
- name: Install Node.js
317320
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f #v6.3.0
318321
with:
@@ -405,6 +408,15 @@ jobs:
405408
with:
406409
command: ${{ inputs.check-types-command }}
407410

411+
- name: Fetch all commits for Nx
412+
if: >-
413+
steps.check-check-types.outputs.exists-script != 'true' &&
414+
steps.check-check-types.outputs.exists-nx-target == 'true'
415+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
416+
with:
417+
fetch-depth: 0
418+
persist-credentials: false
419+
408420
- name: Build commands list
409421
id: build-commands
410422
run: |

0 commit comments

Comments
 (0)