Skip to content

Commit

Permalink
Modifying the Allowed Users settings to use env.ALLOWED_USERS (#16335)
Browse files Browse the repository at this point in the history
* Updating the ALLOWED_USERS list with current resources authorized to perform deployment rollbacks.
  • Loading branch information
emvaldes authored Oct 25, 2024
1 parent a1627fa commit 7c97376
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deployment_rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }}

0 comments on commit 7c97376

Please sign in to comment.