Skip to content

Commit

Permalink
feat(workflow): add actions/cache
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Nov 7, 2023
1 parent 2bbb911 commit 06c63f9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ jobs:
- name: πŸ— Setup Docker Buildx
uses: docker/[email protected]

# - name: πŸ— Cache Docker Layers
# uses: actions/cache@v3
# with:
# path: /tmp/.buildx-cache
# key: image-${{ matrix.name }}-version-${{ matrix.version.full }}-buildx-${{ hashFiles(format('{0}/Container_folder', matrix.path)) }}
- name: πŸ— Cache Docker Layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: image-${{ matrix.name }}-version-${{ matrix.version.full }}-buildx-${{ hashFiles(format('{0}/Container_folder', matrix.path)) }}

- name: πŸ— Log into registry ${{env.REGISTRY}}
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder == 'true' }}
Expand All @@ -92,10 +92,10 @@ jobs:
push: ${{github.event_name != 'pull_request'}}
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
# cache-from: type=gha
# cache-to: type=gha,mode=max

- name: πŸ— Sign the published container image
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder == 'true' }}
Expand Down

0 comments on commit 06c63f9

Please sign in to comment.