Skip to content

Janitor

Janitor #17802

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:
kubetest2-sweeper:
# disable in forks
if: github.repository == 'awslabs/amazon-eks-ami'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # 4.3.1
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN_JANITOR }}
- uses: ./.github/actions/janitor/kubetest2-sweeper
with:
max_resource_age_duration: 3h
ami-sweeper:
# disable in forks
if: github.repository == 'awslabs/amazon-eks-ami'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
- uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # 4.3.1
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