From 3a2cf82d7639d73606c03d4020806d1bbdbe0230 Mon Sep 17 00:00:00 2001 From: Ernesto Baschny Date: Mon, 24 Mar 2025 19:14:19 +0100 Subject: [PATCH 1/2] Try to make the gha cache work --- .github/workflows/build-and-push.yml | 8 ++++---- .github/workflows/build-only.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 0a684c7..83ab67b 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -50,8 +50,8 @@ jobs: tags: "croneu/phpapp-fpm:php-${{ matrix.php-version }}" platforms: ${{ env.PLATFORMS }} push: true - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=php-${{ matrix.php-version }}-${{ env.PLATFORMS }} + cache-to: type=gha,mode=max,scope=php-${{ matrix.php-version }}-${{ env.PLATFORMS }} target: php-fpm build-args: | PHP_MINOR_VERSION=${{ matrix.php-version }} @@ -111,8 +111,8 @@ jobs: tags: "croneu/phpapp-ssh:php-${{ matrix.php-version }}-node-${{ matrix.node-version }}" platforms: ${{ env.PLATFORMS }} push: true - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=php-${{ matrix.php-version }}-node-${{ matrix.node-version }}-${{ env.PLATFORMS }} + cache-to: type=gha,mode=max,scope=php-${{ matrix.php-version }}-node-${{ matrix.node-version }}-${{ env.PLATFORMS }} target: ssh build-args: | PHP_MINOR_VERSION=${{ matrix.php-version }} diff --git a/.github/workflows/build-only.yml b/.github/workflows/build-only.yml index 6d550e0..a421633 100644 --- a/.github/workflows/build-only.yml +++ b/.github/workflows/build-only.yml @@ -37,8 +37,8 @@ jobs: tags: "croneu/phpapp-fpm:php-${{ matrix.php-version }}" platforms: ${{ env.PLATFORMS }} push: false - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=php-${{ matrix.php-version }}-${{ env.PLATFORMS }} + cache-to: type=gha,mode=max,scope=php-${{ matrix.php-version }}-${{ env.PLATFORMS }} target: php-fpm build-args: | PHP_MINOR_VERSION=${{ matrix.php-version }} @@ -76,8 +76,8 @@ jobs: tags: "croneu/phpapp-ssh:php-${{ matrix.php-version }}-node-${{ matrix.node-version }}" platforms: ${{ env.PLATFORMS }} push: false - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=php-${{ matrix.php-version }}-node-${{ matrix.node-version }}-${{ env.PLATFORMS }} + cache-to: type=gha,mode=max,scope=php-${{ matrix.php-version }}-node-${{ matrix.node-version }}-${{ env.PLATFORMS }} target: ssh build-args: | PHP_MINOR_VERSION=${{ matrix.php-version }} From a09086a98082452c54754e8c9f63e62dc7c45f66 Mon Sep 17 00:00:00 2001 From: Ernesto Baschny Date: Mon, 24 Mar 2025 19:17:04 +0100 Subject: [PATCH 2/2] Also ignore .git in the docker context --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 8fbd66a..6e5d305 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +/.git /.buildx-cache /.github /example-app