You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-08-24-github-actions-export-actions-usage.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: 'Three Ways to Export GitHub Actions Usage Reports for an Organization'
2
+
title: 'Exporting GitHub Actions Dependency Data for Your Organization'
3
3
author: Josh Johanning
4
4
date: 2025-08-24 09:30:00 -0500
5
5
description: 'Compare three methods for getting GitHub Actions usage data for organization governance: The Dependency Insights view in GitHub, @stoe/action-reporting-cli, and my custom SBOM script'
@@ -65,9 +65,9 @@ The [`@stoe/action-reporting-cli`](https://github.com/stoe/action-reporting-cli)
65
65
**Key features:**
66
66
67
67
-**Multiple export formats**: CSV, JSON, and Markdown outputs
68
-
-**Comprehensive data collection**: workflows, permissions, secrets, variables, runner environments
69
-
-**Flexible scope options**: enterprise, organization, or repository-level analysis
-**Comprehensive data collection**: in addition to what actions are used, [can also report](https://github.com/stoe/action-reporting-cli?tab=readme-ov-file#report-content-options) on secrets, variables, permissions, listeners (workflow triggers), and/or runners
69
+
-**Flexible scope options**: run for an entire enterprise (can't use GitHub App though), organization, or a single repository
70
+
-**Advanced filtering**: exclude GitHub-created actions, unique actions reporting, and ability to exclude archived and forked repositories
71
71
72
72
**Sample output**:
73
73
@@ -112,7 +112,7 @@ The approach I've developed focuses on SBOM-style reporting with automated GitHu
112
112
113
113
What makes this script useful:
114
114
115
-
-**Usage frequency counts**: Shows how many times each Action is used across the organization
115
+
-**Usage frequency counts**: Shows how many times each Action is used across the organization in an SBOM-like report
116
116
-**Version distribution**: Identifies which versions of Actions are most commonly used
117
117
-**SHA resolution**: Automatically resolves commit SHAs to readable tag versions when possible
118
118
@@ -178,8 +178,8 @@ What makes this script useful:
178
178
## Choosing the Right Method
179
179
180
180
-[**Use GitHub Dependency Insights**](#method-1-githubs-dependency-insights-view-only) first to get familiar with your organization's usage patterns
181
-
-[**Use @stoe/action-reporting-cli**](#method-2-stoeaction-reporting-cli-full-featured-solution) for comprehensive analysis with flexible export options, and especially if you want to report on other things like secrets, variables, or permissions (see: [Using the Pre-Built Workflows](#using-the-pre-built-workflows) section)
182
-
-[**Use my custom SBOM script**](#method-3-custom-sbom-script-my-lightweight-solution) if you want usage statistics and the ability to resolve SHAs to tag versions (see: [Using the Pre-Built Workflows](#using-the-pre-built-workflows) section)
181
+
-[**Use @stoe/action-reporting-cli**](#method-2-stoeaction-reporting-cli-full-featured-solution) for comprehensive analysis with flexible export options, and especially if you want to [report on other things](https://github.com/stoe/action-reporting-cli?tab=readme-ov-file#report-content-options) like secrets, variables, permissions, listeners (workflow triggers), and/or runners (For implementing, see: [Using the Pre-Built Workflows](#using-the-pre-built-workflows) section)
182
+
-[**Use my custom SBOM script**](#method-3-custom-sbom-script-my-lightweight-solution) if you want usage statistics and the ability to resolve SHAs to tag versions (For implementing, see: [Using the Pre-Built Workflows](#using-the-pre-built-workflows) section)
183
183
184
184
## Using the Pre-Built Workflows
185
185
@@ -188,10 +188,14 @@ To implement these solutions in your organization:
188
188
1.**Fork or copy** the [export-actions-usage-report](https://github.com/joshjohanning-org/export-actions-usage-report) repository
189
189
- If you fork it, make sure to enable Actions for the forked repository to allow the scheduled job to run
190
190
2.**Set up GitHub App authentication**:
191
-
- Create a GitHub App with Organization Administration permissions (Read & Write)
191
+
- Create a GitHub App with the following permissions:
192
+
-**Repository permissions:** "Actions" (Read) - to read workflows and their usage (for [`@stoe/action-reporting-cli`](https://github.com/stoe/action-reporting-cli))
193
+
-**Repository permissions:** "Contents" (Read) - to access SBOM data via dependency graph (for my [custom SBOM script](https://github.com/joshjohanning/github-misc-scripts/blob/main/gh-cli/get-actions-usage-in-organization.sh))
194
+
- Install the app on your organization granting it access to all repositories
192
195
- Add the App ID as a repository variable (`APP_ID`)
193
196
- Add the private key as a repository secret (`PRIVATE_KEY`)
194
-
- See my [post on GitHub Apps](/posts/github-apps/) for detailed instructions on creating and configuring a GitHub App
197
+
- You can use a personal access token, but a GitHub app has a higher rate limit
198
+
- See [my post on GitHub Apps](/posts/github-apps/) for detailed instructions on creating and configuring a GitHub App
195
199
3.**Customize the workflows** if needed (different schedule, additional output formats, etc.)
0 commit comments