This action deletes DataStax AstraDB databases that have not been used for some time.
Related actions:
@nicoloboschi/setup-astradb
action: Creates a AstraDB database.@nicoloboschi/cleanup-astradb
action: Deletes a specific AstraDB database.
Input name | Description | Required | Default Value |
---|---|---|---|
token | Astra DB application token. It needs to have enough permissions to create/delete databases in the organization. | true | |
threshold-seconds | Threshold in seconds to delete databases based on their last usage time. | false | 3600 (1 hour) |
wait | Whether to wait for the database to be deleted or not. | false | true |
env | Astra DB environment. (ENV, PROD). | false | PROD |
name: Clean Astra env
on:
workflow_dispatch: { }
schedule:
- cron: "*/5 * * * *"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Clean AstraDB databases that have not been used in the last hour
uses: nicoloboschi/cleanup-astradb-env@v1
with:
token: ${{ secrets.ASTRA_DB_TOKEN }}