Skip to content

Commit

Permalink
Clear build cache during CI
Browse files Browse the repository at this point in the history
Appears there is an issue where the build cache grows unbounded until it hits Github's limit (docker/build-push-action#252, moby/buildkit#1896). Clear the cache after builds to prevent this
  • Loading branch information
mdegat01 committed Nov 10, 2021
1 parent b042d32 commit a81c133
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,11 @@ jobs:
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=edge
# This ugly bit is necessary, or our cache will grow forever...
# Well until we hit GitHub's limit of 5GB :)
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Swap build cache
run: |
rm -rf /tmp/.docker-cache
mv /tmp/.docker-cache-new /tmp/.docker-cache

0 comments on commit a81c133

Please sign in to comment.