From d95a00050b4c9959e9c02c1b514cbdd85f552d44 Mon Sep 17 00:00:00 2001 From: antoniotarricone Date: Wed, 29 May 2024 16:54:41 +0200 Subject: [PATCH] Fixed the retrieving of docker image with sha256. --- .github/workflows/build-n-push-main.yml | 6 +++--- .github/workflows/post-merge.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-n-push-main.yml b/.github/workflows/build-n-push-main.yml index f8fc1b79..004ddd76 100644 --- a/.github/workflows/build-n-push-main.yml +++ b/.github/workflows/build-n-push-main.yml @@ -114,10 +114,10 @@ jobs: docker push -a ghcr.io/${{ github.repository }} # - # Get sha256 of Docker image. + # Get Docker image with sha256. # - - name: Get sha256 of Docker image - run: echo "image_sha256=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:$BRANCH_NAME | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV" + - name: Get Docker image with sha256 + run: echo "image_sha256=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:$BRANCH_NAME)" >> "$GITHUB_ENV" # # Login to Azure. diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml index abca6ee0..ce01cfab 100644 --- a/.github/workflows/post-merge.yml +++ b/.github/workflows/post-merge.yml @@ -154,11 +154,11 @@ jobs: docker push -a ghcr.io/${{ github.repository }} # - # RELEASE CANDICATE - Get sha256 of Docker image. + # RELEASE CANDICATE - Get Docker image with sha256. # - - name: RELEASE CANDIDATE - Get sha256 of Docker image + - name: RELEASE CANDIDATE - Get Docker image with sha256 if: steps.semantic.outputs.new_release_published == 'true' - run: echo "image_sha256_rc=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}-RC | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV" + run: echo "image_sha256_rc=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }}-RC)" >> "$GITHUB_ENV" # # Login to Azure. @@ -270,11 +270,11 @@ jobs: docker push -a ghcr.io/${{ github.repository }} # - # STABLE - Get sha256 of Docker image. + # STABLE - Get Docker image with sha256. # - - name: STABLE - Get sha256 of Docker image + - name: STABLE - Get Docker image with sha256 if: steps.semantic.outputs.new_release_published == 'true' - run: echo "image_sha256=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }} | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV" + run: echo "image_sha256=$(docker image inspect -f '{{index .RepoDigests 0}}' ghcr.io/${{ github.repository }}:${{ steps.semantic.outputs.new_release_version }})" >> "$GITHUB_ENV" # # STABLE - Update Container App.