apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: pr-cleaner
spec:
  schedule: "*/1 * * * *"
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 3
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: tkn
            image: ghcr.io/kwkoo/tkn-ubi8:0.13.1
            imagePullPolicy: IfNotPresent
            args:
            - tkn
            - pr
            - delete
            - "-f"
            - "--keep"
            - "3"
          restartPolicy: OnFailure