File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,15 +231,22 @@ jobs:
231231 exit 1
232232 fi
233233 echo "✅ integrations-testsuite image verified"
234+ # Get hash of Docker images list for cache key
235+ - name : Hash Docker images list
236+ if : ${{ inputs.GO_TEST_INTEGRATION_ENABLED && inputs.DOCKER_CACHE_IMAGES != '' }}
237+ id : images-hash
238+ run : |
239+ HASH=$(echo "${{ inputs.DOCKER_CACHE_IMAGES }}" | sha256sum | cut -d' ' -f1 | head -c 12)
240+ echo "hash=${HASH}" >> $GITHUB_OUTPUT
234241 # Cache custom Docker images (specified by caller)
235242 - name : Cache custom Docker images
236243 if : ${{ inputs.GO_TEST_INTEGRATION_ENABLED && inputs.DOCKER_CACHE_IMAGES != '' }}
237244 uses : actions/cache@v4
238245 with :
239246 path : /tmp/.custom-docker-cache
240- key : docker-custom-images-${{ runner.os }}-${{ github.run_number % 20 }}-v1
247+ key : docker-custom-images-${{ runner.os }}-${{ steps.images-hash.outputs.hash }}-${{ github.run_number % 20 }}-v1
241248 restore-keys : |
242- docker-custom-images-${{ runner.os }}-
249+ docker-custom-images-${{ runner.os }}-${{ steps.images-hash.outputs.hash }}-
243250 # Pre-pull custom Docker images before running tests
244251 - name : Load or pull custom Docker images
245252 if : ${{ inputs.GO_TEST_INTEGRATION_ENABLED && inputs.DOCKER_CACHE_IMAGES != '' }}
You can’t perform that action at this time.
0 commit comments