From 499091e46bd12ded054fd6d86d151e6c42a49c9e Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 3 Oct 2020 23:33:32 +0200 Subject: [PATCH] Check digests Signed-off-by: CrazyMax --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d810f49..c700d8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -221,6 +221,8 @@ jobs: github-cache-first: runs-on: ubuntu-latest + outputs: + digest: ${{ steps.docker_build.outputs.digest }} services: registry: image: registry:2 @@ -334,6 +336,14 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} + - + name: Check digests + run: | + echo Compare "${{ needs.github-cache-first.outputs.digest }}" with "${{ steps.docker_build.outputs.digest }}" + if [ "${{ needs.github-cache-first.outputs.digest }}" != "${{ steps.docker_build.outputs.digest }}" ]; then + echo "::error::Digests should be identical" + exit 1 + fi - name: Cache hit run: echo ${{ steps.cache.outputs.cache-hit }}