Skip to content

Commit

Permalink
fix: cannot cache containers with docker driver
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Aug 15, 2024
1 parent bcd5f5f commit 3c57b3d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up Docker Buildkit
run: echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV

- name: Cache Docker Layers
uses: actions/cache@v4
with:
path: /tmp/docker-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-
- name: Log into GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
Expand All @@ -61,11 +50,8 @@ jobs:
with:
context: .
file: ./Dockerfile.slim
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}-slim
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/docker-cache
cache-to: type=local,dest=/tmp/docker-cache

- name: Build and push
uses: docker/build-push-action@v4
Expand All @@ -75,7 +61,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/docker-cache
cache-to: type=local,dest=/tmp/docker-cache
build-args: |
SLIM_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}-slim

0 comments on commit 3c57b3d

Please sign in to comment.