# Token for a GitHub Actions workload.
# The system:bot role requires botName. Configure that bot's impersonation role
# separately so it can request the RBAC roles the job needs.
apiVersion: almaforge.com/v1
kind: Token
metadata:
  name: ci-orders-pg # CI job ALMA_CLIENT_ID value.
spec:
  roles:
    - system:bot # CI jobs join as bots, then impersonate allowed RBAC roles.
  botName: ci-orders-pg # Existing Bot resource this token is scoped to.
  github:
    # enterpriseServerHost: ghe.example.com # Set for GitHub Enterprise Server.
    allow:
      - repository: my-org/orders # owner/repo that may use this token.
        repositoryOwner: my-org # Extra guard against repository transfer.
        workflow: production deploy # GitHub workflow name.
        ref: refs/heads/main # Git ref the workflow must run on.
        refType: branch # Accepted values are branch or tag.
        environment: production # GitHub deployment environment.
