# Token that lets the ci-orders-readonly bot join from a specific
# GitHub Actions workflow on my-org/orders. Pin every claim the
# workflow already controls (repository, workflow name, ref) so a
# leaked OIDC token from a feature-branch workflow cannot use this
# token.
apiVersion: almaforge.com/v1
kind: Token
metadata:
  name: ci-orders-readonly
spec:
  roles:
    - system:bot
  botName: ci-orders-readonly # Must exist before the first join.
  github:
    allow:
      - repository: my-org/orders # owner/repo of the GitHub workflow.
        workflow: orders-db-checks # GitHub workflow name, not the filename.
        ref: refs/heads/main # Git ref the workflow must run on.
        refType: branch # branch or tag.
