Skip to content

Commit

Permalink
Try using GHCR as cache directly
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 11, 2024
1 parent 332ceaf commit cdcf793
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ fromJSON(steps.meta.outputs.json).tags[0] }}
cache-to: inline

- name: Push Docker image
uses: docker/build-push-action@v4
if: ${{ github.event_name != 'pull_request' }}
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ github.event_name }}
cache-to: |
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache,mode=max
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-${{ github.event_name }},mode=max

0 comments on commit cdcf793

Please sign in to comment.