apiVersion: batch/v1
kind: Job
metadata:
  name: acyl-integration
spec:
  template:
    spec:
      containers:
      - name: acyl-integration
        image: acyl:integration
        imagePullPolicy: Never
        command:
          - "/go/bin/acyl"
        args:
          - "integration"
          - "--data-file"
          - "/opt/integration/data.json"
          - "--webhook-file"
          - "/opt/integration/webhook.json"
        env:
          - name: "GITHUB_TOKEN"
            valueFrom:
              secretKeyRef:
                name: acyl-integration
                key: github_token
          - name: "GITHUB_APP_PRIVATE_KEY"
            valueFrom:
              secretKeyRef:
                name: acyl-integration
                key: github_app_private_key
          - name: "GITHUB_APP_ID"
            valueFrom:
              secretKeyRef:
                name: acyl-integration
                key: github_app_id
          - name: "GITHUB_APP_HOOK_SECRET"
            valueFrom:
              secretKeyRef:
                name: acyl-integration
                key: github_app_hook_secret
      restartPolicy: Never
  backoffLimit: 0