Skip to content

Commit

Permalink
fix: Use registry cache type instead of gha
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Mar 22, 2024
1 parent 816d1d6 commit f188150
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ jobs:
target: ${{ matrix.package }}
platforms: ${{ matrix.platform }}
push: true
provenance: false
tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:latest
cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }}
cache-from: type=registry,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }}
cache-to: type=registry,mode=max,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }}

- name: Build ${{ matrix.package }} (release)
uses: docker/build-push-action@v5
Expand All @@ -50,6 +51,7 @@ jobs:
target: ${{ matrix.package }}
platforms: ${{ matrix.platform }}
push: true
provenance: false
tags: ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:${{github.event.release.name}},ghcr.io/mohamedbassem/hoarder-${{ matrix.package }}:release
cache-from: type=gha,scope=${{ matrix.package }}-${{ matrix.platform }}
cache-to: type=gha,mode=max,scope=${{ matrix.package }}-${{ matrix.platform }}
cache-from: type=registry,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }}
cache-to: type=registry,mode=max,ref=ghcr.io/mohamedbassem/hoarder-build-cache:${{ matrix.package }}

0 comments on commit f188150

Please sign in to comment.