Skip to content

Commit

Permalink
include snuba image sha in cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK committed Dec 22, 2024
1 parent 7ee17c8 commit 25135b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ jobs:
source .env
SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}")
echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT
SNUBA_IMAGE_SHA=$(docker buildx imagetools inspect $SNUBA_IMAGE --format "{{println .Manifest.Digest}}")
echo "SNUBA_IMAGE_SHA=$SNUBA_IMAGE_SHA" >> $GITHUB_OUTPUT
- name: Restore DB Volumes Cache
id: restore_cache
uses: actions/cache/restore@v4
with:
key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}
key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }}
restore-keys: |
db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}
db-volumes-v2-
db-volumes-
path: |
Expand Down Expand Up @@ -178,13 +181,16 @@ jobs:
source .env
SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}")
echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT
SNUBA_IMAGE_SHA=$(docker buildx imagetools inspect $SNUBA_IMAGE --format "{{println .Manifest.Digest}}")
echo "SNUBA_IMAGE_SHA=$SNUBA_IMAGE_SHA" >> $GITHUB_OUTPUT
- name: Restore DB Volumes Cache
id: restore_cache
uses: actions/cache/restore@v4
with:
key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}
key: db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}-${{ steps.cache_key.outputs.SNUBA_IMAGE_SHA }}
restore-keys: |
db-volumes-v2-${{ steps.cache_key.outputs.SENTRY_IMAGE_SHA }}
db-volumes-v2-
db-volumes-
path: |
Expand Down

0 comments on commit 25135b5

Please sign in to comment.