From 7c973764ca45f828ce7941013a975c658388e3ab Mon Sep 17 00:00:00 2001 From: "Eduardo Valdes Jr." <1084551+emvaldes@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:15:01 -0700 Subject: [PATCH] Modifying the Allowed Users settings to use env.ALLOWED_USERS (#16335) * Updating the ALLOWED_USERS list with current resources authorized to perform deployment rollbacks. --- .github/workflows/deployment_rollback.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deployment_rollback.yml b/.github/workflows/deployment_rollback.yml index 35342708a52..1b35fdd641b 100644 --- a/.github/workflows/deployment_rollback.yml +++ b/.github/workflows/deployment_rollback.yml @@ -15,19 +15,19 @@ jobs: DeployToCandidateSlot: runs-on: ubuntu-latest env: - ALLOWED_USERS: "lucasdze,jeremy-page,JosiahSiegel,snesm,supriyaaddagada" + ALLOWED_USERS: "devopsmatt,emvaldes,scott-aquia,bethbeza" steps: - name: Check if actor is allowed to run the workflow if: ${{ contains(env.ALLOWED_USERS, github.actor) }} run: echo "The user is allowed to run the workflow." - + - name: Check if actor is NOT allowed to run the workflow if: ${{ !contains(env.ALLOWED_USERS, github.actor) }} run: | echo "This user is not allowed to run the workflow." exit 1 - + - name: "Check out changes" uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 @@ -63,11 +63,11 @@ jobs: - name: Swap Slots run: | az functionapp deployment slot swap --name pdh${{ env.ENV }}-functionapp --resource-group prime-data-hub-${{ env.ENV }} --slot candidate --target-slot production - + - name: Verify the Running Container run: | - az webapp config container show --name pdh${{ env.ENV }}-functionapp --resource-group prime-data-hub-${{ env.ENV }} + az webapp config container show --name pdh${{ env.ENV }}-functionapp --resource-group prime-data-hub-${{ env.ENV }} - name: Remove runner IP from Function App firewall run: | - az functionapp config access-restriction remove --name pdh${{ env.ENV }}-functionapp --resource-group prime-data-hub-${{ env.ENV }} --ip-address ${{ steps.runner_ip.outputs.ip-address }} + az functionapp config access-restriction remove --name pdh${{ env.ENV }}-functionapp --resource-group prime-data-hub-${{ env.ENV }} --ip-address ${{ steps.runner_ip.outputs.ip-address }}