Forked from berendt/Delete a tag on all repositories in an organisation
Created
April 19, 2023 20:19
-
-
Save miiraheart/b2865386cf3b4c5cd27415055d934ea8 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