Skip to content

Commit

Permalink
Fix check for message
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Nov 8, 2023
1 parent 605a01a commit 29a1c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clean_untagged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ do
echo "Checking for untagged versions for $image_name"
escaped_image_name=$(echo ${image_name} | sed "s/\//%2f/g")
response=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/orgs/devcontainers/packages/container/$escaped_image_name/versions?per_page=100")
message=$(echo $response | jq -r .message)
if [[ $message == "null" ]]; then
message=$(echo $response | jq -r ".message?")
if [[ -z "$message" || "$message" == "null" ]]; then
version_ids=$( | jq -r ".[] | select(.metadata.container.tags | length ==0) | .id")
for version_id in ${version_ids[@]};
do
Expand Down

0 comments on commit 29a1c56

Please sign in to comment.