#!/usr/bin/env bash
# digests.sh - print the digest each demo tag points to today, as shell variables.
# Usage: eval "$(./digests.sh)"
R=ghcr.io/heyvaldemar/kubernetes-supply-chain-admission
for n in app unsigned vulnerable no-provenance no-sbom no-scan; do
  d="$(docker buildx imagetools inspect "$R/$n:latest" 2>/dev/null | awk '/^Digest:/{print $2}')"
  v="$(echo "$n" | tr 'a-z-' 'A-Z_')"
  echo "export $v=$R/$n@$d"
done
