38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
name: CI Test Cleanup
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
Test-User-Data-Cleanup:
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
strategy:
|
|
matrix:
|
|
folder: [Corso_Restore_, TestRestore, testfolder, incrementals_ci_, Alcion_Restore_, '']
|
|
user: ['JohannaL@10rqc2.onmicrosoft.com']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '1.19'
|
|
|
|
# sets the maximimum time to now-30m.
|
|
# CI test have a 10 minute timeout.
|
|
# At 20 minutes ago, we should be safe from conflicts.
|
|
# The additional 10 minutes is just to be good citizens.
|
|
- name: Set purge boundary
|
|
run: |
|
|
echo "HALF_HOUR_AGO=$(date -d '2 minutes ago' -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
|
|
|
|
- name: Purge CI-Produced Folders
|
|
uses: ./.github/actions/purge-m365-user-data
|
|
with:
|
|
user: ${{ matrix.user }}
|
|
folder-prefix: ${{ matrix.folder }}
|
|
older-than: ${{ env.HALF_HOUR_AGO }}
|
|
azure-client-id: ${{ secrets.CLIENT_ID }}
|
|
azure-client-secret: ${{ secrets.CLIENT_SECRET }}
|
|
azure-tenant-id: ${{ secrets.TENANT_ID }}
|