From 10022710cb2de888e961eda63d1e41568262ea54 Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:03:04 +0200 Subject: [PATCH] outputs angepasst fuer id uebergabe --- .github/workflows/docker_bullseye_unified.yml | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_bullseye_unified.yml b/.github/workflows/docker_bullseye_unified.yml index c36ade769..34d22092b 100644 --- a/.github/workflows/docker_bullseye_unified.yml +++ b/.github/workflows/docker_bullseye_unified.yml @@ -29,6 +29,7 @@ jobs: outputs: image_name: ${{ steps.get-image-name.outputs.image_name }} + cache_key: ${{ steps.cache-restore.outputs.cache-primary-key }} steps: - uses: actions/checkout@v4 @@ -66,30 +67,21 @@ jobs: cache-from: type=gha,scope=${{ env.CACHE_SCOPE }} outputs: type=docker,dest=${{ env._PATH_DOCKER_IMAGE_TAR }} + - run: docker image ls + - id: get-image-name run: | - docker image ls imageName=${{ fromJSON(steps.docker-build.outputs.metadata)['image.name'] }} echo "::set-output name=image_name::$imageName" - - run: echo "runner_temp ${{ runner.temp }}" - - run: echo "github_workspace ${{ github.workspace }}" - - run: ls -l ./ - - run: ls -l ~ - - - run: echo "hashFiles ${{ hashFiles( env._PATH_DOCKER_IMAGE_TAR ) }}" - - run: echo "hashFiles ${{ hashFiles( './tmp/rpi-jukebox-rfid-bullseye.tar' ) }}" - - - name: Cache Check Docker Image uses: actions/cache/restore@v3 id: cache-restore with: lookup-only: true - key: ${{ env.DOCKER_IMAGE_NAME }}-${{ hashFiles( env._PATH_DOCKER_IMAGE_TAR ) }} + key: ${{ env.DOCKER_IMAGE_NAME }}-${{ steps.docker-build.outputs.ImageID }} path: ${{ env._PATH_DOCKER_IMAGE_TAR }} - - name: Cache Save Docker Image uses: actions/cache/save@v3 if: ${{ ! steps.cache-restore.outputs.cache-hit }} @@ -118,7 +110,7 @@ jobs: - name: Cache Restore Docker Image uses: actions/cache/restore@v3 with: - key: ${{ env.DOCKER_IMAGE_NAME }}-${{ hashFiles( env._PATH_DOCKER_IMAGE_TAR ) }} + key: ${{ needs.prepare.outputs.cache_key }} path: ${{ env._PATH_DOCKER_IMAGE_TAR }} fail-on-cache-miss: true @@ -133,7 +125,7 @@ jobs: - name: Run ${{ matrix.test_Script }} Bullseye ARMv7 uses: tj-actions/docker-run@v2 with: - image: ${{needs.prepare.outputs.image_name}} + image: ${{ needs.prepare.outputs.image_name }} options: --platform linux/arm/v7 --user ${{ matrix.username }} name: ${{ matrix.test_Script }} args: |