apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: daily-score
spec:
  schedule: "0 0 * * 0,3"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: run-score
            image: gcr.io/openssf/cron:latest
            imagePullPolicy: Always
            command:
            - /bin/sh
            - -c
            - ./cron/cron.sh
            env:
            - name: GITHUB_AUTH_TOKEN
              valueFrom:
                secretKeyRef:
                  name: github
                  key: token
            - name: GCS_BUCKET
              value: ossf-scorecards
            - name: BLOB_URL
              value: "gs://ossf-scorecards-cache"
            - name: USE_BLOB_CACHE
              value: "true"
            resources:
              limits:
                memory: 1Gi
              requests:
                memory: 1Gi
          restartPolicy: OnFailure
