cli/test/integration/attestation-cmd/verify/verify-oci-bundle.sh
Meredith Lancaster b6c2b4ff2a try nesting scripts
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-10 11:58:23 -07:00

14 lines
708 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Get the root directory of the repository
rootDir="$(git rev-parse --show-toplevel)"
ghBuildPath="$rootDir/bin/gh"
# Verify an OCI artifact with bundles stored on the GHCR OCI registry
echo "Testing with OCI image ghcr.io/github/artifact-attestations-helm-charts/policy-controller:v0.10.0-github9 with the --bundle-from-oci flag"
if ! $ghBuildPath attestation verify oci://ghcr.io/github/artifact-attestations-helm-charts/policy-controller:v0.10.0-github9 --owner=github --bundle-from-oci; then
echo "Failed to verify oci://ghcr.io/github/artifact-attestations-helm-charts/policy-controller:v0.10.0-github9 with bundles from the GHCR OCI registry"
exit 1
fi