From b7d0a217774c97fd6545d3419f3a837ba8ada5da Mon Sep 17 00:00:00 2001
From: Frugan <dev@frugan.it>
Date: Tue, 18 Jun 2024 22:09:50 +0200
Subject: [PATCH] build: add actions/cache

---
 .github/workflows/ci.yml  | 23 +++++++++++++++--------
 acf-uppy/include_from.txt |  2 +-
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dd09524..0894ed2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,14 +29,21 @@ jobs:
     - name: Set up Docker
       uses: docker/setup-buildx-action@v1
 
-    #- name: Cache Docker layers
-    #  uses: actions/cache@v4
-    #  with:
-    #    path: |
-    #      /tmp/.buildx-cache
-    #    key: ${{ runner.os }}-${{ matrix.mariadb_tag }}-${{ matrix.wordpress_tag }}-${{ matrix.node_tag }}-buildx-${{ hashFiles('**/.buildx-cache') }}
-    #    restore-keys: |
-    #      ${{ runner.os }}-${{ matrix.mariadb_tag }}-${{ matrix.wordpress_tag }}-${{ matrix.node_tag }}-buildx-
+    - name: Cache Docker layers
+      uses: actions/cache@v4
+      with:
+        path: /tmp/.buildx-cache
+        key: ${{ runner.os }}-buildx-${{ matrix.mariadb_tag }}-${{ matrix.wordpress_tag }}-${{ matrix.node_tag }}-${{ hashFiles('**/Dockerfile') }}
+        restore-keys: |
+          ${{ runner.os }}-buildx-${{ matrix.mariadb_tag }}-${{ matrix.wordpress_tag }}-${{ matrix.node_tag }}-
+
+    - name: Cache npm modules
+      uses: actions/cache@v4
+      with:
+        path: ~/.npm
+        key: ${{ runner.os }}-node-${{ matrix.node_tag }}-${{ hashFiles('**/package-lock.json') }}
+        restore-keys: |
+          ${{ runner.os }}-node-${{ matrix.node_tag }}-
 
     - name: Set GITHUB_ENV
       run: |
diff --git a/acf-uppy/include_from.txt b/acf-uppy/include_from.txt
index 1f3ea9d..edc3293 100644
--- a/acf-uppy/include_from.txt
+++ b/acf-uppy/include_from.txt
@@ -9,6 +9,6 @@
 + vendor/
 - vendor/bin/
 + vendor/**
-+ README.txt
++ readme.txt
 + acf-uppy.php
 - *