Skip to content

ROSA Scheduled Delete #55

ROSA Scheduled Delete

ROSA Scheduled Delete #55

name: ROSA Scheduled Delete
on:
workflow_dispatch:
schedule:
- cron: '0 19 * * *' # Runs every day at 7 PM UTC.
jobs:
rosa-delete:
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
uses: ./.github/workflows/rosa-cluster-delete.yml
secrets: inherit
with:
deleteAll: yes
aurora-delete:
needs: rosa-delete
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure AWS CLI
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set region ${{ vars.AWS_DEFAULT_REGION }}
- if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
shell: bash
run: ./provision/aws/rds/aurora_cluster_reaper.sh
env:
AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }}
route53-delete:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup ROSA CLI
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
uses: ./.github/actions/rosa-cli-setup
with:
aws-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-default-region: ${{ vars.AWS_DEFAULT_REGION }}
rosa-token: ${{ secrets.ROSA_TOKEN }}
- name: Delete Route 53 entries
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
run: ./provision/aws/route53/route53_delete.sh
env:
AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }}