diff --git a/ci/organization-packages.sh b/ci/organization-packages.sh index 88d116a03..ba8eb8173 100644 --- a/ci/organization-packages.sh +++ b/ci/organization-packages.sh @@ -24,8 +24,8 @@ 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} | jq -rc '.[].name'\e[0m" -packages=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/"${ORGANIZATION}"/packages?package_type="${PACKAGE_TYPE}" | jq -rc '.[].name') +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} | jq -rc '.[].name'\e0m" +packages=$(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}" | jq -rc '.[].name') echo -e "\e[35m\e[1mpackages:\e[0m" for pkg in ${packages}