The actions/cache action performs prefix matching when restoring caches.
Since the x86 cache key "ubuntu-24.04" is a prefix of the ARM cache key
"ubuntu-24.04-arm", when the ARM job completed first, the x86 job's
cache action would restore the ARM image (prefix match) and overwrite
the freshly built x86 image before saving.

Fix this by using actions/cache/save which only saves and never
attempts to restore. The prepare-container job creates new images
and doesn't need to restore from cache.

Signed-off-by: Ihar Hrachyshka <[email protected]>
---
 .github/workflows/test.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 407ef9c4d..887bb8899 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -74,7 +74,7 @@ jobs:
 
       - name: Cache image
         id: image_cache
-        uses: actions/cache@v4
+        uses: actions/cache/save@v4
         with:
           path: /tmp/image.tar
           key: ${{ github.sha }}/${{ github.event_name }}
-- 
2.52.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to