Last active
March 26, 2024 06:42
-
-
Save lonegunmanb/659b3b0ea566d5867ab1f23ebf2f11c0 to your computer and use it in GitHub Desktop.
eol mcr image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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