Skip to content

Commit

Permalink
(CI)(organization-packages) use curl instead of GH api
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Sep 19, 2023
1 parent bdc76f0 commit 603d450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/organization-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 603d450

Please sign in to comment.