Github CI: update open62541 version, try avoid useles doker image rebuild
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 20 Jul 2023 19:04:34 +0200
changeset 3828 57545857bdce
parent 3827 50e79436f9b4
child 3829 18aae6235e76
Github CI: update open62541 version, try avoid useles doker image rebuild
.github/workflows/run_tests_in_docker.yml
--- a/.github/workflows/run_tests_in_docker.yml	Thu Jul 20 17:04:14 2023 +0200
+++ b/.github/workflows/run_tests_in_docker.yml	Thu Jul 20 19:04:34 2023 +0200
@@ -24,27 +24,34 @@
     - uses: actions/checkout@v3
       with:
           repository: open62541/open62541
-          ref: v1.3.3
+          ref: v1.3.6
           path: open62541
           submodules: recursive
 
-    - name: Cache docker image
-      id: cache-docker
-      uses: actions/cache@v3
+    - name: Restore cached docker image
+      id: cache-docker-restore
+      uses: actions/cache/restore@v3
       env:
         cache-name: cache-docker
       with:
         path: /tmp/latest.tar
         key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('beremiz/tests/tools/Docker/beremiz-sikuli') }}
 
-    - if: ${{ steps.cache-docker.outputs.cache-hit == false }}
+    - if: ${{ steps.cache-docker-restore.outputs.cache-hit == false }}
       name: Create docker image
       run: |
         cd beremiz/tests/tools/Docker
         ./build_docker_image.sh
         docker image save --output="/tmp/latest.tar" beremiz_sikuli
 
-    - if: ${{ steps.cache-docker.outputs.cache-hit != false }}
+    - name: Save docker image in cache
+      id: cache-docker-save
+      uses: actions/cache/save@v3
+      with:
+        path: /tmp/latest.tar
+        key: ${{ steps.cache-docker-restore.outputs.cache-primary-key }}
+
+    - if: ${{ steps.cache-docker-restore.outputs.cache-hit != false }}
       name: Re-use docker image
       run: |
         docker image load --input="/tmp/latest.tar"