Last active
April 1, 2024 17:18
-
-
Save berendt/fca9bfae23d6462ffab6e861dee82707 to your computer and use it in GitHub Desktop.
Quay API recipes
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 | |
NAMESPACE=your_namespace_on_quay | |
TAG=the_tag | |
# https://quay.io/organization/your_namespace_on_quay?tab=applications | |
ACCESS_TOKEN=xxxxx | |
for repository in $(curl -s -X GET -H "Authorization: Bearer $ACCESS_TOKEN" "https://quay.io/api/v1/repository?namespace=$NAMESPACE" | jq -r '.repositories[].name' | sort); do | |
curl -s -X DELETE -H "Authorization: Bearer $ACCESS_TOKEN" https://quay.io/api/v1/repository/$NAMESPACE/$repository/tag/$TAG | |
done |
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 | |
NAMESPACE=your_namespace_on_quay | |
# https://quay.io/organization/your_namespace_on_quay?tab=applications | |
ACCESS_TOKEN=xxxxx | |
for repository in $(curl -s -X GET -H "Authorization: Bearer $ACCESS_TOKEN" "https://quay.io/api/v1/repository?namespace=$NAMESPACE" | jq -r '.repositories[].name' | sort); do | |
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"visibility":"public"}' "https://quay.io//api/v1/repository/$NAMESPACE/$repository/changevisibility" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment