Skip to content

Janitor

Janitor #1463

Workflow file for this run

name: "Janitor"
on:
workflow_dispatch:
schedule:
# hourly at the top of the hour
- cron: "0 * * * *"
permissions:
id-token: write
contents: read
jobs:
cluster-sweeper:
# disable in forks
if: github.repository == 'awslabs/amazon-eks-ami'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN_JANITOR }}
- uses: ./.github/actions/janitor/cluster-sweeper
with:
# 3 hours
max_age_seconds: 10800
ami-sweeper:
# disable in forks
if: github.repository == 'awslabs/amazon-eks-ami'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN_JANITOR }}
- uses: ./.github/actions/janitor/ami-sweeper
with:
# 3 days
max_age_seconds: 259200