Skip to content

Instantly share code, notes, and snippets.

@lonegunmanb
Last active March 26, 2024 06:42
Show Gist options
  • Select an option

  • Save lonegunmanb/659b3b0ea566d5867ab1f23ebf2f11c0 to your computer and use it in GitHub Desktop.

Select an option

Save lonegunmanb/659b3b0ea566d5867ab1f23ebf2f11c0 to your computer and use it in GitHub Desktop.
eol mcr image
#!/usr/bin/env bash
# Login to the registry
echo "oras login"
oras login -u $REGISTRY_USERNAME -p $REGISTRY_ADMIN_PASSWORD $REGISTRY_NAME
# Split SHA_DIGESTS by comma and iterate over each digest
echo "oras eol"
for digest in $(echo $SHA_DIGESTS | tr "," "\n")
do
# Attach each digest
oras attach --artifact-type "application/vnd.microsoft.artifact.lifecycle" --annotation "vnd.microsoft.artifact.lifecycle.end-of-life.date=2024-01-01T00:00:00Z" $ARTIFACT_REFERENCE@$digest
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment