Skip to content

Commit

Permalink
Maximize caching by storing in registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Silex committed Aug 15, 2024
1 parent 24e2887 commit 6788c83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ runs:
push: ${{ github.ref == 'refs/heads/master' }}
tags: ${{ join(fromJSON(steps.data.outputs.ghcr_tags), ', ') }}
context: images/${{ inputs.version }}/${{ inputs.context }}
cache-from: type=registry,ref=${{ fromJSON(steps.data.outputs.ghcr_tags)[0] }}
cache-to: type=inline,mode=min
cache-from: type=registry,ref=${{ fromJSON(steps.data.outputs.ghcr_tags)[0] }}-cache
cache-to: type=registry,ref=${{ fromJSON(steps.data.outputs.ghcr_tags)[0] }}-cache,mode=max

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -49,6 +49,6 @@ runs:
with:
pull: false
push: ${{ github.ref == 'refs/heads/master' }}
cache-from: ${{ fromJSON(steps.data.outputs.ghcr_tags)[0] }}
cache-from: ${{ fromJSON(steps.data.outputs.ghcr_tags)[0] }}-cache
tags: ${{ join(fromJSON(steps.data.outputs.tags), ', ') }}
context: images/${{ inputs.version }}/${{ inputs.context }}

0 comments on commit 6788c83

Please sign in to comment.