apiVersion: batch/v1
kind: Job
metadata:
  name: action-runner
  namespace: default
spec:
  ttlSecondsAfterFinished: 100
  template:
    spec:
      containers:
      - env:
        - name: ACCESS_TOKEN
          valueFrom:
            secretKeyRef: {key: token, name: githubtoken}
        - name: REPO_URL
          value: "https://github.com/navyatejaotturu-metronom/java-consumer"
        - name: RUNNER_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: RUNNER_WORKDIR
          value: /tmp/github-runner-your-repo
        image: navyateja/githubrunner:v3
        imagePullPolicy: IfNotPresent
        name: runner
        volumeMounts:
        - name: dockersock
          mountPath: /var/run/docker.sock
        - name: workdir
          mountPath: /tmp/github-runner-your-repo
      restartPolicy: Never
      volumes:
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      - name: workdir
        hostPath:
          path: /tmp/github-runner-your-repo
