Skip to content

Commit

Permalink
Use separate cache scopes for frontend and worker
Browse files Browse the repository at this point in the history
Otherwise, the cache is effectively discarded since the same images
aren't used for both builds and the cache therefore assumes they're
no longer in use and garbage-collects them.

See docker/build-push-action#252 (comment)
  • Loading branch information
rra committed Feb 17, 2022
1 parent 5dd853d commit e184a50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
context: .
push: true
tags: lsstsqre/vo-cutouts:${{ steps.vars.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=frontend
cache-to: type=gha,mode=max,scope=frontend

- name: Build and push the worker image
uses: docker/build-push-action@v2
Expand All @@ -107,5 +107,5 @@ jobs:
push: true
file: ./Dockerfile.worker
tags: lsstsqre/vo-cutouts-worker:${{ steps.vars.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=worker
cache-to: type=gha,mode=max,scope=worker

0 comments on commit e184a50

Please sign in to comment.