Skip to content

ROSA Scheduled Delete #25

ROSA Scheduled Delete

ROSA Scheduled Delete #25

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

Check failure on line 12 in .github/workflows/auto-delete-on-schedule.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/auto-delete-on-schedule.yml

Invalid workflow file

error parsing called workflow ".github/workflows/auto-delete-on-schedule.yml" -> "./.github/workflows/rosa-cluster-delete.yml" (source branch with sha:3e7482b298c8a646db70347df204299d3e49aaa9) : workflow is not reusable as it is missing a `on.workflow_call` trigger
secrets: inherit
with:
deleteAll: yes
aurora-delete:
needs: rosa-delete
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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@v3
- 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 }}