Skip to content

Commit 79d0a24

Browse files
committed
ci: Fix cash for nx
1 parent 2b50ac3 commit 79d0a24

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ jobs:
1919
- name: Get branch names.
2020
id: branch-names
2121
uses: tj-actions/branch-names@v8
22-
23-
- name: Running on the default branch.
24-
if: steps.branch-names.outputs.is_default == 'true'
25-
run: |
26-
echo "Running on default: ${{ steps.branch-names.outputs.current_branch }}"
2722
- name: Restore cached .nx
2823
id: cache-nx-restore
2924
uses: actions/cache/restore@v4
@@ -70,7 +65,24 @@ jobs:
7065
fetch-depth: 0
7166
- name: Npm install
7267
uses: ./.github/actions
68+
- name: Get branch names.
69+
id: branch-names
70+
uses: tj-actions/branch-names@v8
71+
- name: Restore cached .nx
72+
id: cache-nx-restore
73+
uses: actions/cache/restore@v4
74+
with:
75+
path: |
76+
.nx
77+
key: ${{ runner.os }}-nx-${{ steps.branch-names.outputs.current_branch }}"
7378
- run: git branch --track main origin/master
7479
- run: npm run typeorm migration:run
7580
- run: npm run seed:run
7681
- run: npx nx affected -t e2e --parallel=1
82+
- name: Save cached .nx
83+
id: cache-dependencies-save
84+
uses: actions/cache/save@v4
85+
with:
86+
path: |
87+
.nx
88+
key: ${{ steps.cache-nx-restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)