Skip to content

eBPF-based security platform

ci: check for a finished VM image by its key file

Daniel Borkmanne3f31d84edaf
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index f6fc3378..c19fe839 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -74,8 +74,11 @@ jobs:
path: build/target-deps
key: ${{ steps.target-deps.outputs.cache-primary-key }}
+ # hashFiles reads every byte it matches and gives up after two
+ # minutes, too short for an image; the key file beside one is
+ # written once the image is complete.
- name: Save the VM images
- if: always() && steps.images.outputs.cache-hit != 'true' && hashFiles('build/test-vm/cache/runtime/*.qcow2') != ''
+ if: always() && steps.images.outputs.cache-hit != 'true' && hashFiles('build/test-vm/cache/runtime/.*.key') != ''
uses: actions/cache/save@v4
with:
path: build/test-vm/cache