Skip to content

Commit

Permalink
Merge pull request #87 from LibreCodeCoop/chore/save-cache
Browse files Browse the repository at this point in the history
chore: save cache
  • Loading branch information
vitormattos authored Feb 13, 2025
2 parents ce0f3e1 + cd820dd commit dd70958
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:
platforms: linux/amd64,linux/arm64
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
tags: |
ghcr.io/librecodecoop/nextcloud-dev-${{ matrix.container }}
ghcr.io/librecodecoop/nextcloud-dev-${{ matrix.container }}:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Push container image
Expand All @@ -74,12 +75,16 @@ jobs:
platforms: linux/amd64,linux/arm64
file: ${{ steps.dockerfile.outputs.DOCKERFILE }}
tags: |
ghcr.io/librecodecoop/nextcloud-dev-${{ matrix.container }}
ghcr.io/librecodecoop/nextcloud-dev-${{ matrix.container }}:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Save Docker cache
if: steps.docker-cache.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ matrix.container }}-buildx-${{ github.sha }}

0 comments on commit dd70958

Please sign in to comment.