From 7474d494de9a6cd1aeab798044569ca0b7adb03a Mon Sep 17 00:00:00 2001 From: Bryan Spears Date: Thu, 30 Apr 2026 13:30:09 -0700 Subject: [PATCH] feat(php-builds): switch image cache from GHA to registry Apply the same registry-cache pattern from #117 to the remaining PHP docker build workflows. Uses a per-variant `:buildcache-*` tag so multiple of these workflows can safely coexist in a single repo. --- .github/workflows/php-build-push.yaml | 4 ++-- .github/workflows/php-cli-build-push.yaml | 4 ++-- .github/workflows/php-nginx-build-push.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/php-build-push.yaml b/.github/workflows/php-build-push.yaml index 72ea63d..76bc740 100644 --- a/.github/workflows/php-build-push.yaml +++ b/.github/workflows/php-build-push.yaml @@ -100,5 +100,5 @@ jobs: platforms: linux/amd64 target: ${{ inputs.build_target }} tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }} - cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max \ No newline at end of file diff --git a/.github/workflows/php-cli-build-push.yaml b/.github/workflows/php-cli-build-push.yaml index 67c11d4..0de477d 100644 --- a/.github/workflows/php-cli-build-push.yaml +++ b/.github/workflows/php-cli-build-push.yaml @@ -89,5 +89,5 @@ jobs: tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.new_tag }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest build-args: | BUILD_VERSION=${{ inputs.new_tag }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-cli + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-cli,mode=max diff --git a/.github/workflows/php-nginx-build-push.yaml b/.github/workflows/php-nginx-build-push.yaml index 95bd18c..e35ffdb 100644 --- a/.github/workflows/php-nginx-build-push.yaml +++ b/.github/workflows/php-nginx-build-push.yaml @@ -56,5 +56,5 @@ jobs: push: true platforms: linux/amd64 tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nginx-${{ inputs.tag }} - cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-nginx + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-nginx,mode=max \ No newline at end of file