-
Notifications
You must be signed in to change notification settings - Fork 64
34 lines (31 loc) · 1.11 KB
/
e2e_resource_cleanup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: e2e_resource_cleanup
# This is required by aws-actions/configure-aws-credentials
permissions:
id-token: write
contents: read
on:
schedule:
- cron: '0 * * * *' # Every hour
workflow_dispatch:
jobs:
cleanup_e2e_resources:
runs-on: ubuntu-latest
strategy:
# will finish running other clen up matrices even if one fails
fail-fast: false
matrix:
region: [us-west-2, us-east-1, ca-central-1, eu-central-1]
testAccount: ${{ fromJson(vars.E2E_TEST_ACCOUNTS) }}
env:
AWS_REGION: ${{ matrix.region }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # version 4.1.4
- uses: ./.github/actions/setup_node
- uses: ./.github/actions/install_with_cache
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # version 4.0.2
with:
role-to-assume: arn:aws:iam::${{ matrix.testAccount }}:role/e2e-resource-cleanup
aws-region: ${{ matrix.region }}
- name: Run E2E resource cleanup
run: npm run e2e:cleanup-resources