From 3a070ae3cf04d1ebd3916ab51685bc6af798267a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 16 May 2024 17:09:09 +0200 Subject: [PATCH] Enable caching in GitHub Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This hopefully prevents spurious rebuilds even nothing changed in practice, leading to unnecessary repulls on the user’s end. --- .github/workflows/daemon.yml | 2 ++ .github/workflows/php.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/daemon.yml b/.github/workflows/daemon.yml index 7cbcb19..07b63d8 100644 --- a/.github/workflows/daemon.yml +++ b/.github/workflows/daemon.yml @@ -47,6 +47,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ghcr.io/${{ env.organization }}/${{ env.image }}:latest,ghcr.io/${{ env.organization }}/${{ env.image }}:${{ steps.extract_version.outputs.version }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - uses: actions/attest-build-provenance@v1 if: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 19276da..05325ab 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -47,6 +47,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ghcr.io/${{ env.organization }}/${{ env.image }}:latest,ghcr.io/${{ env.organization }}/${{ env.image }}:${{ steps.extract_version.outputs.version }} platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - uses: actions/attest-build-provenance@v1 if: ${{ github.event_name != 'pull_request' }} @@ -84,6 +86,8 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ghcr.io/${{ env.organization }}/${{ env.image }}:alpine,ghcr.io/${{ env.organization }}/${{ env.image }}:${{ steps.extract_version.outputs.version }}-alpine platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max - uses: actions/attest-build-provenance@v1 if: ${{ github.event_name != 'pull_request' }}