mirror of
https://github.com/apache/superset.git
synced 2026-07-12 01:35:36 +00:00
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: 🎪 Showtime Cleanup
|
|
|
|
# Scheduled cleanup of expired environments
|
|
on:
|
|
schedule:
|
|
- cron: '0 */6 * * *' # Every 6 hours
|
|
|
|
# Manual trigger for testing
|
|
workflow_dispatch:
|
|
|
|
# Common environment variables
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
AWS_REGION: ${{ vars.AWS_REGION || 'us-west-2' }}
|
|
GITHUB_ORG: ${{ github.repository_owner }}
|
|
GITHUB_REPO: ${{ github.event.repository.name }}
|
|
|
|
jobs:
|
|
cleanup-expired:
|
|
name: Clean up expired showtime environments
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write # delete orphaned showtime label definitions (label CRUD is the issues API)
|
|
pull-requests: write
|
|
|
|
steps:
|
|
- name: Install Superset Showtime
|
|
run: pip install superset-showtime
|
|
|
|
- name: Cleanup expired environments and orphaned labels
|
|
run: |
|
|
echo "Cleaning up environments respecting TTL labels, and pruning orphaned 🎪 labels"
|
|
python -m showtime cleanup --respect-ttl --force
|