This action extracts billing and usage numbers from a GitHub enterprise and creates a report as an issue in the repository where it is running.
-
enterprise_slug
: The slug of the enterprise you wish to query -
enterprise_token
: The token that has access to the enterprise you wish to queryThis should be created as a GitHub Actions secret in the repository that is using this action. This token should have the following scopes:
admin:enterprise
admin:org
-
github_token
: The token that will be used to create the issue (defaults to the automatic token provided by GitHub) -
issue_title
: The title of the report issue (default:GHEC Usage Report
)This title will be used as the issue title, as well as the top heading of the issue body with the date of the run appended to it.
A great way to using this action is with a scheduler. Here's an example workflow file that will run our action on the 28th day of the month, every month:
on:
schedule:
- cron: '0 0 28 * *'
jobs:
report:
name: Report on GitHub Enterprise Cloud Usage
runs-on: ubuntu-latest
steps:
- name: Generate Report
id: report
uses: ActionsDesk/[email protected] # Replace with the latest version
with:
enterprise_slug: awesome-enterprise
enterprise_token: ${{ secrets.ENTERPRISE_TOKEN }}
issue_title: My Enterprise Report
The following Markdown will be generated in the issue body:
This usage report is for the **ENTERPRISE_SLUG** GHEC account.
## AssetPacks
Total Purchased: 6
## Enterprise Organizations
| Name | Login | Billing Email |
| -------- | --------- | ------------- |
| ORG_NAME | ORG_LOGIN | BILLING_EMAIL |
## Bandwidth
| Usage | Quota | Usage Percentage |
| ----- | ----- | ---------------- |
| 0 | 0 | 0 |
## Storage
| Usage | Quota | Usage Percentage |
| ----- | ----- | ---------------- |
| 0 | 0 | 0 |
## Licenses
| Total Licenses | All Licensable Users Count | Total Available Licenses |
| -------------- | -------------------------- | ------------------------ |
| 0 | 0 | 0 |
## Actions Usage
| Minutes Used | Paid Minutes Used | Included Minutes |
| ------------ | ----------------- | ---------------- |
| 0 | 0 | 0 |
## Packages Usage
| Total GB Bandwidth Used | Total Paid GB Bandwidth Used | Included GB Bandwidth |
| ----------------------- | ---------------------------- | --------------------- |
| 0 | 0 | 0 |
## Shared Storage Usage
| Days Left In Cycle | Estimated Paid Storage For Month | Estimated Storage For Month |
| ------------------ | -------------------------------- | --------------------------- |
| 0 | 0 | 0 |
All contributions are welcome, from issues to pull requests. Please take a look at our CONTRIBUTION.md file for details!