Skip to content

e2e_resource_cleanup #10716

e2e_resource_cleanup

e2e_resource_cleanup #10716

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
with:
node-version: 18
- uses: ./.github/actions/install_with_cache
with:
node-version: 18
cdk-version: FROM_PACKAGE_LOCK
- 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