Skip to content

Commit

Permalink
Update docker cache
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <[email protected]>
  • Loading branch information
ajtudela committed Oct 17, 2024
1 parent 0f865b2 commit 0f21833
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
id: scitos2-builder

- name: Cache Docker layers
uses: actions/cache@v4.0.2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand All @@ -48,12 +48,20 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build against scitos2-builder
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6
with:
builder: ${{ steps.scitos2-builder.outputs.name }}
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache-new

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

0 comments on commit 0f21833

Please sign in to comment.