From a6ba016a847d0a3417f9a10578cc9c25920e2c3a Mon Sep 17 00:00:00 2001 From: Jordan Hoey Date: Tue, 19 Mar 2024 14:36:37 +0000 Subject: [PATCH] update --- .github/workflows/parsegithubissue.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/parsegithubissue.yaml b/.github/workflows/parsegithubissue.yaml index 31298930..c673da4c 100644 --- a/.github/workflows/parsegithubissue.yaml +++ b/.github/workflows/parsegithubissue.yaml @@ -1,4 +1,4 @@ -name: Auto shutdown exclusion requests +name: Auto Parse github form run-name: ${{ github.actor }} - issue:${{ github.event.issue.number }} on: issues: @@ -152,6 +152,11 @@ jobs: ${{ env.ISSUE_COMMENT }} Please edit this issue and select "Update comment" to resubmit. + #End workflow if for processing finds an error + - name: exit flow if approver == requester + if: env.PROCESS_SUCCESS != 'true' + run: exit 1 + # Login to Azure CLI (for cost analysis) - name: 'Az CLI login' uses: azure/login@v1 @@ -221,9 +226,11 @@ jobs: labels: "Cost Error" #Set approval_state environment var to auto-approved if cost value is less than £5,000 - - name: set auto-approved status + - name: set approved status if: env.COST_DETAILS < 5000 - run: echo "APPROVAL_STATE=auto-approved" >> $GITHUB_ENV + run: | + echo "APPROVAL_STATE=auto-approved" >> $GITHUB_ENV + echo "APPROVAL_COMMENT=Auto approved" >> $GITHUB_ENV #Add auto approved label if approval_state == auto-approved - name: Add auto-approved label