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
{{ message }}
Repository navigation
Nothing the agent does in GitHub Actions shows up in the usage dashboard #17
I set up the PR review workflow and it works — reviews get posted, and each one used to print its token count and cost at the bottom of the comment.
But the usage dashboard shows none of it. It only ever shows the runs I do from my own machine. Every review the Action has done is missing: no runs, no tokens, no spend, nothing in "By surface".
What I expected
CI runs are the ones I actually care about costing. The local ones are me experimenting. If anything it is backwards right now.
What I have worked out
I think the container has nowhere to write — I set FORGE_USAGE_DB in the workflow and it changed nothing, which would make sense if the file disappears with the container at the end of the job.
What I would like
Some way for a run in Actions to reach the dashboard. I do not mind if it needs a URL and a token; I would rather that than open a pull request to read a number off a comment. If there is a simpler way that works without me hosting anything, that would be better still.
You're trying to centralize usage data from your GitHub Actions runs into a single dashboard, rather than having each action run store its data in a temporary local file. The FORGE_USAGE_DB environment variable is for specifying a local SQLite database file, which, as you've observed, isn't suitable for ephemeral CI environments.
Here's how to set up a centralized usage dashboard and have your GitHub Actions report to it:
Set up the Usage Dashboard Server:
You need to run the ShipIT Forge usage dashboard as a server that your GitHub Actions can report to. This server will store the usage data in a persistent SQLite database.
Action: Choose a hosting provider (e.g., Cloud Run, Render) and deploy the Forge usage server. The deploy/ directory in this repository has guides. For example, for Cloud Run, you would follow deploy/cloudrun.sh and deploy/DEPLOY.md.
Command (example for local testing):
FORGE_USAGE_DB=./usage-dashboard.db FORGE_DASHBOARD_TOKEN=your_secret_token npm run serve-usage
Replace your_secret_token with a strong, secret token. This token will be used to authenticate incoming usage reports.
Check: The server should be running and accessible at a public URL (e.g., https://your-dashboard-url.com). Make sure FORGE_USAGE_DB is set to a persistent location on your server, not a temporary one.
Configure GitHub Action to Report to the Dashboard:
Once your usage dashboard server is running, configure your GitHub Action to send its usage data to this server.
Action: In your GitHub Actions workflow file (e.g., .github/workflows/ci.yml), add the following environment variables to the step that runs ShipIT Forge:
Replace https://your-dashboard-url.com/api/usage with the actual URL of your deployed dashboard's usage API endpoint.
Action: Add FORGE_DASHBOARD_TOKEN to your GitHub repository secrets with the same secret token you set up for your dashboard server.
Verify it worked:
Trigger a GitHub Actions workflow run.
After the run completes, navigate to your deployed usage dashboard URL. You should see new entries reflecting the usage from your CI runs. The "By surface" breakdown should now include data from your GitHub Actions.
What to watch out for:
Security of FORGE_DASHBOARD_TOKEN: Treat FORGE_DASHBOARD_TOKEN as a sensitive secret. Do not hardcode it in your workflow files; always use GitHub Secrets.
Server Accessibility: Ensure your usage dashboard server is publicly accessible from GitHub's IP ranges if you are hosting it behind a firewall.
Persistent Storage: Double-check that the FORGE_USAGE_DB on your dashboard server is configured to use persistent storage (e.g., a mounted volume on Cloud Run, or a persistent disk) so that data is not lost if the server restarts.
Where to read more:
src/usage/serve.ts: The code for the usage dashboard server.
src/usage/api.ts: Defines the API for reporting usage.
deploy/: Deployment guides for various platforms.
src/action.ts: The main GitHub Action entry point, which would consume these environment variables.
Activity
iamrraj commentedon Aug 4, 2026
/help how do I record CI runs into the usage dashboard?
github-actions commentedon Aug 4, 2026
You're trying to centralize usage data from your GitHub Actions runs into a single dashboard, rather than having each action run store its data in a temporary local file. The
FORGE_USAGE_DBenvironment variable is for specifying a local SQLite database file, which, as you've observed, isn't suitable for ephemeral CI environments.Here's how to set up a centralized usage dashboard and have your GitHub Actions report to it:
Set up the Usage Dashboard Server:
You need to run the ShipIT Forge usage dashboard as a server that your GitHub Actions can report to. This server will store the usage data in a persistent SQLite database.
deploy/directory in this repository has guides. For example, for Cloud Run, you would followdeploy/cloudrun.shanddeploy/DEPLOY.md.your_secret_tokenwith a strong, secret token. This token will be used to authenticate incoming usage reports.https://your-dashboard-url.com). Make sureFORGE_USAGE_DBis set to a persistent location on your server, not a temporary one.Configure GitHub Action to Report to the Dashboard:
Once your usage dashboard server is running, configure your GitHub Action to send its usage data to this server.
.github/workflows/ci.yml), add the following environment variables to the step that runs ShipIT Forge:https://your-dashboard-url.com/api/usagewith the actual URL of your deployed dashboard's usage API endpoint.FORGE_DASHBOARD_TOKENto your GitHub repository secrets with the same secret token you set up for your dashboard server.Verify it worked:
What to watch out for:
FORGE_DASHBOARD_TOKEN: TreatFORGE_DASHBOARD_TOKENas a sensitive secret. Do not hardcode it in your workflow files; always use GitHub Secrets.FORGE_USAGE_DBon your dashboard server is configured to use persistent storage (e.g., a mounted volume on Cloud Run, or a persistent disk) so that data is not lost if the server restarts.Where to read more:
src/usage/serve.ts: The code for the usage dashboard server.src/usage/api.ts: Defines the API for reporting usage.deploy/: Deployment guides for various platforms.src/action.ts: The main GitHub Action entry point, which would consume these environment variables.