Skip to content

Cloud infrastructure Cleanup #1146

Cloud infrastructure Cleanup

Cloud infrastructure Cleanup #1146

Workflow file for this run

# Destroys any cloud infrastructure that was deployed for the purpose of E2E testing.
name: Cloud infrastructure Cleanup
on:
workflow_dispatch:
repository_dispatch:
types: [ cleanup-infrastructure ]
schedule:
- cron: "0 2 * * *" # Every day at 2AM.
jobs:
aws-nuke:
runs-on: ubuntu-latest
permissions:
id-token: write
container:
image: rebuy/aws-nuke
options: --user root -v ${{ github.workspace }}:/workspace
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::726952677045:role/GitHubActionsWebinyJsAdminAccess
aws-region: eu-central-1
# We need this step because of the `aws-nuke.yml` config which is stored in our repo.
- uses: actions/checkout@v4
- name: Run AWS Nuke
run: >
aws-nuke
--config ./.github/workflows/cleanup/aws-nuke.yml
--no-dry-run
--force
--force-sleep 3
--max-wait-retries 100
--access-key-id ${{ env.AWS_ACCESS_KEY_ID }}
--secret-access-key ${{ env.AWS_SECRET_ACCESS_KEY }}
--session-token ${{ env.AWS_SESSION_TOKEN }}