diff --git a/ci/organization-packages.sh b/ci/organization-packages.sh index c757f32b4..9dcf9e85f 100644 --- a/ci/organization-packages.sh +++ b/ci/organization-packages.sh @@ -24,18 +24,18 @@ done echo -e "\e[35m\e[1mORGANIZATION = ${ORGANIZATION}\e[0m" echo -e "\e[35m\e[1mPACKAGE_TYPE = ${PACKAGE_TYPE}\e[0m" -echo -e "\e[1mgh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" /orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1 | jq -rc '.[].name'\e[0m" -output=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/"${ORGANIZATION}"/packages?package_type="${PACKAGE_TYPE}"&per_page=100&page=1) +echo -e "\e[1mgh api -H \"Accept: application/vnd.github+json\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\" | jq -rc '.[].name'\e[0m" +output=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1") echo -e "return value: $?" echo -e "output: ${output}" packages=$(jq -rc '.[].name' <<< "${output}") echo -e "packages:\n${packages}" -echo -e "\e[1mcurl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${GH_TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1 | jq -rc '.[].name'\e0m" -output=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GH_TOKEN}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/"${ORGANIZATION}"/packages?package_type="${PACKAGE_TYPE}"&per_page=100&page=1) +echo -e "\e[1mcurl -L -H \"Accept: application/vnd.github+json\" -H \"Authorization: Bearer \${GH_TOKEN}\" -H \"X-GitHub-Api-Version: 2022-11-28\" \"https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1\" | jq -rc '.[].name'\e0m" +output=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${GH_TOKEN}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/${ORGANIZATION}/packages?package_type=${PACKAGE_TYPE}&per_page=100&page=1") echo -e "return value: $?" echo -e "output: ${output}" packages=$(jq -rc '.[].name' <<< "${output}") -echo -e "packages:\n${packages} +echo -e "packages:\n${packages}" echo -e "\e[35m\e[1mpackages:\e[0m" for pkg in ${packages}