Skip to content

πŸš€ A GitHub action to delete a DataStax AstraDB databases that have not been used for some time.

License

Notifications You must be signed in to change notification settings

nicoloboschi/cleanup-astradb-env

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@nicoloboschi/cleanup-astradb-env Github action

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.

Action Inputs

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

Example

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 }}

About

πŸš€ A GitHub action to delete a DataStax AstraDB databases that have not been used for some time.

Resources

License

Stars

Watchers

Forks

Packages

No packages published