forked from awslabs/amazon-eks-ami
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.06 KB
/
janitor.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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@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/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@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