]> BookStack Code Mirror - bookstack/commitdiff
Further updated github actions config
authorDan Brown <redacted>
Sat, 18 Jan 2020 15:27:57 +0000 (15:27 +0000)
committerDan Brown <redacted>
Sat, 18 Jan 2020 15:27:57 +0000 (15:27 +0000)
- Added composer caching based off github docs.
- Focused when actions run so they're not running unneccessarily.

.github/workflows/phpunit.yml

index 9a2b03da7ca3aaf662f17c0f39994c7247038cbb..4a641c56b5d15055f249c6169fe1d3e59c73778f 100644 (file)
@@ -1,6 +1,15 @@
 name: phpunit
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+      - release
+  pull_request:
+    branches:
+      - '*'
+      - '*/*'
+      - '!l10n_master'
 
 jobs:
   build:
@@ -12,10 +21,13 @@ jobs:
     - uses: actions/checkout@v1
 
     - name: Cache composer packages
+      id: composer-cache
+      run: |
+        echo "::set-output name=dir::$(composer config cache-files-dir)"
       uses: actions/cache@v1
       with:
-        path: ~/.cache/composer
-        key: ${{ runner.os }}-node-${{ matrix.php }}
+        path: ${{ steps.composer-cache.outputs.dir }}
+        key: ${{ runner.os }}-composer-${{ matrix.php }}
 
     - name: Setup Database
       run: |