From 5eca70059a6a1c689c8b40a7f169b5421fe48850 Mon Sep 17 00:00:00 2001 From: "Aman Kumar [SSW]" <71385247+amankumarrr@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:51:09 +1000 Subject: [PATCH] adding check to echo the array --- .github/workflows/check-active-prs-and-slots.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-active-prs-and-slots.yml b/.github/workflows/check-active-prs-and-slots.yml index 6ad7f7e9bb..f6d2ad2ccb 100644 --- a/.github/workflows/check-active-prs-and-slots.yml +++ b/.github/workflows/check-active-prs-and-slots.yml @@ -87,6 +87,7 @@ jobs: if ( $SlotsWithoutPR.Length -gt 0 ) { $SlotsWithoutPRArray = $SlotsWithoutPR -join ' ' Write-Host "⚡- These slots need to be deleted : $SlotsWithoutPRArray" + echo $SlotsWithoutPRArray echo "SlotsWithoutPRArray=$SlotsWithoutPRArray" >> $env:GITHUB_OUTPUT } else { Write-Host "✅ - Some PRs have not their slot deployed!" @@ -94,9 +95,9 @@ jobs: deleteSlot: name: Invoking the flow to delete slots - if: ( ${{ needs.check-pr-slots.outputs.SlotsWithoutPRArray.Length }} -gt 0) - uses: ./.github/workflows/pr-close-delete-env.yml needs: check-pr-slots + if: ${{ needs.check-pr-slots.outputs.SlotsWithoutPRArray }} != '' + uses: ./.github/workflows/pr-close-delete-env.yml with: pullRequestId: ${{ needs.check-pr-slots.outputs.SlotsWithoutPRArray }} permissions: