Skip to content

Commit

Permalink
Adding second check to avoid to avoid running second flow
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr committed Aug 9, 2023
1 parent f7656d8 commit 028d5bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check-active-prs-and-slots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
SlotID: ${{ steps.listOfSlots.outputs.SlotID }}
AreSlotsEqual: ${{steps.comparision.outputs.AreSlotsEqual }}

steps:
- name: Checking out
Expand Down Expand Up @@ -98,8 +99,8 @@ jobs:
invokeDeleteSlot:
name: Invoking PR Close/Delete
needs:
- check-pr-slots
if: needs.check-pr-slots.outputs.SlotID != ''
- check-pr-slots #Adding second check to avoid running this flow for the second time when SlotID is already in the memory
if: needs.check-pr-slots.outputs.SlotID != '' && needs.check-pr-slots.outputs.AreSlotsEqual == 'False'
uses: ./.github/workflows/pr-close-delete-env.yml
with:
pullRequestId: ${{ needs.check-pr-slots.outputs.SlotID }}
Expand Down

0 comments on commit 028d5bc

Please sign in to comment.