Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (45 loc) · 1.71 KB
/
Copy pathaction.yml
File metadata and controls
45 lines (45 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: 'Copilot Report'
description: 'GitHub Copilot Enterprise licence and AI credit usage report, optionally enriched with Entra ID department data'
inputs:
github-token:
description: 'PAT with read:enterprise and manage_billing:enterprise scopes. Cannot be the built-in GITHUB_TOKEN.'
required: true
enterprise:
description: 'GitHub Enterprise slug'
required: true
upn-domain:
description: 'Email domain for Entra ID lookup when GitHub carries no email address (e.g. example.com)'
required: false
default: ''
entra-tenant:
description: 'Override the Azure AD tenant ID for the Graph API lookup. Auto-resolved from upn-domain via OIDC discovery; only needed when that result is incorrect.'
required: false
default: ''
credits:
description: 'Override credits-per-seat value if your portal shows a different pool size'
required: false
default: ''
output:
description: 'Output CSV file path (default: copilot-report-YYYYMMDD.csv)'
required: false
default: ''
no-entra:
description: 'Skip Entra ID department lookup'
required: false
default: 'false'
runs:
using: composite
steps:
- name: Generate Copilot report
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
GITHUB_ENTERPRISE: ${{ inputs.enterprise }}
UPN_DOMAIN: ${{ inputs.upn-domain }}
ENTRA_TENANT: ${{ inputs.entra-tenant }}
CREDITS_PER_SEAT_OVERRIDE: ${{ inputs.credits }}
run: |
ARGS=()
[[ -n "${{ inputs.output }}" ]] && ARGS+=(--output "${{ inputs.output }}")
[[ "${{ inputs.no-entra }}" == "true" ]] && ARGS+=(--no-entra)
"${{ github.action_path }}/github-copilot-report.sh" "${ARGS[@]}"