Skip to content

A self-hosted media server and file management system

chore: ci optimise

aminnausin726740eb1d0e
diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml
index 84d380e4..11b438df 100644
--- a/.github/workflows/ci-test.yml
+++ b/.github/workflows/ci-test.yml
@@ -85,14 +85,16 @@ jobs:
coverage: none
- name: Cache Composer dependencies
+ id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- - name: Install Dependencies
- run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+ - name: Skip Composer install if unchanged
+ if: steps.composer-cache.outputs.cache-hit != 'true'
+ run: composer install --no-interaction --prefer-dist
# ---------- Laravel Setup ----------
- name: Copy .env
@@ -148,13 +150,15 @@ jobs:
uses: actions/setup-node@v3
- name: Cache NPM dependencies
+ id: npm-cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- - name: Install node dependencies
+ - name: Skip npm ci if cache-hit
+ if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
# ---------- Build Frontend ----------