From bf2f66398bd581fc811afb7043d8c2b75e9ac897 Mon Sep 17 00:00:00 2001 From: Georgi Matev Date: Thu, 16 Mar 2023 20:07:34 -0400 Subject: [PATCH] Prevent the static purge scripts running in combination without a user (#2832) --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * # #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- .github/actions/purge-m365-user-data/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/purge-m365-user-data/action.yml b/.github/actions/purge-m365-user-data/action.yml index c1b908adb..f064bb363 100644 --- a/.github/actions/purge-m365-user-data/action.yml +++ b/.github/actions/purge-m365-user-data/action.yml @@ -27,7 +27,11 @@ inputs: description: Secret value of for AZURE_CLIENT_SECRET azure-tenant-id: description: Secret value of for AZURE_TENANT_ID - + m365-admin-user: + description: Secret value of for M365TENANT_ADMIN_USER + m365-admin-password: + description: Secret value of for M365TENANT_ADMIN_PASSWORD + runs: using: composite steps: @@ -54,7 +58,7 @@ runs: ./setRetention.ps1 - name: Run the static purge script set - if: ${{ inputs.folder-prefix == '' }} + if: ${{ inputs.folder-prefix == '' && inputs.user != '' }} shell: pwsh working-directory: ./src/cmd/purge/scripts env: