From d6626332b451d9b6790eb0752ac31bb6aa6218a7 Mon Sep 17 00:00:00 2001 From: Farshad DASHTI Date: Fri, 20 Dec 2024 15:11:09 +0000 Subject: [PATCH] Updated worflow to supporting pulling multiple version of the packages --- .github/workflows/nuget-package-template.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nuget-package-template.yml b/.github/workflows/nuget-package-template.yml index ce73c2f..0076557 100644 --- a/.github/workflows/nuget-package-template.yml +++ b/.github/workflows/nuget-package-template.yml @@ -90,8 +90,9 @@ jobs: # Fetch the latest version and increment it for the specific package PACKAGE_ID="${{ inputs.nuget_package_name }}" - FEED_URL="https://nuget.pkg.github.com/DFE-Digital/query?q=$PACKAGE_ID" - ALL_VERSIONS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$FEED_URL" | jq -r '.data[].version') + FEED_URL="https://api.github.com/orgs/DFE-Digital/packages/nuget/$PACKAGE_ID/versions" + + ALL_VERSIONS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$FEED_URL" | jq -r '.[].name') echo "All Versions: ${ALL_VERSIONS:-None}"