Skip to content

Commit

Permalink
ci: Fix cash for nx
Browse files Browse the repository at this point in the history
  • Loading branch information
klerick committed Mar 7, 2024
1 parent 49de0ac commit 2b50ac3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ jobs:
fetch-depth: 0
- name: Npm install
uses: ./.github/actions
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Get branch names.
id: branch-names
uses: tj-actions/branch-names@v8

- name: Running on the default branch.
if: steps.branch-names.outputs.is_default == 'true'
run: |
echo "Running on default: ${{ steps.branch-names.outputs.current_branch }}"
- name: Restore cached .nx
id: cache-nx-restore
uses: actions/cache/restore@v4
with:
path: |
.nx
key: ${{ runner.os }}-nx-${GITHUB_REF##*/}
key: ${{ runner.os }}-nx-${{ steps.branch-names.outputs.current_branch }}"
- run: git branch --track main origin/master
- name: Test and build
run: npx nx affected -t test build --parallel=3 --exclude='json-api-front,json-api-server,json-api-server-e2e,json-shared-type,database,@nestjs-json-api/source'
Expand Down

0 comments on commit 2b50ac3

Please sign in to comment.