Check digests

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-10-03 23:33:32 +02:00
parent ecc23e5785
commit 499091e46b
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
1 changed files with 10 additions and 0 deletions

View File

@ -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 }}