add cron action to purge s3 test bucket weekly (#200)

* add cron action to purge s3 test bucket weekly
This commit is contained in:
Keepers 2022-06-15 12:46:28 -06:00 committed by GitHub
parent e0199b6b26
commit 8272227895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

25
.github/workflows/weekly_cleanup.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: Weekly S3 Test Bucket Cleanup
on:
schedule:
# every saturday at 23:59 (11:59pm)
- cron: "59 23 * * 6"
permissions:
# required to retrieve AWS credentials
id-token: write
jobs:
S3-Test-Cleanup:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::951767375776:role/corso-testing-role
role-session-name: integration-testing
aws-region: us-east-1
- name: Delete all files in the test bucket
run: |
aws s3 rm s3://test-corso-repo-init --recursive