posthog/PostHog CI Metrics
Track workflow duration, success rates, and CI performance in PostHog
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| posthog-token | Your PostHog API token - see project settings section "Project API Key" | yes | — |
| posthog-api-host | Your PostHog API host | no | https://us.i.posthog.com |
| event | The event name to capture e.g. "GitHubActionCompleted". Optional when only creating an annotation. | no | — |
| properties | Properties to add to the event - as a JSON string. Must be possible to `JSON.parse(properties)` | no | — |
| capture-run-duration | Capture run duration via GitHub API (adds duration_seconds and run metadata) | no | false |
| capture-job-durations | Capture timing and status for each job in the workflow (emits one event per job) | no | false |
| github-token | GitHub token for API access (required for capture-run-duration, capture-job-durations, and status-job) | no | — |
| runner | Optional runner label to include in properties (e.g., 'depot') | no | — |
| status-job | Job name to check for workflow status (e.g., 'Django Tests Pass'). Captures that job's conclusion. | no | — |
| annotation | Create a PostHog annotation with this text (e.g., 'Deployed to production'). Can be used standalone or alongside event capture. | no | — |
| annotation-token | API key for the annotations REST API — a personal API key with the annotation:write scope. Defaults to posthog-token. Set this explicitly when capturing an event AND creating an annotation in the same step, because event ingestion uses the project API key while annotations need a personal key. | no | — |
| annotation-scope | Annotation scope: 'project' (default) or 'organization' | no | project |
| annotation-hidden | If 'true', hide the annotation from the PostHog UI (charts and the annotations list) while keeping it readable via the API and MCP. Use for high-frequency markers like deployments. Defaults to 'false'. | no | false |
| annotation-api-host | Host for the PostHog app API used to create annotations — the app host (e.g. https://us.posthog.com, https://eu.posthog.com, or a self-hosted host), NOT the event ingestion host in posthog-api-host. Not restricted to PostHog Cloud. | no | https://us.posthog.com |
| annotation-project-id | Project to create the annotation in. Defaults to '@current' (the project the token belongs to). | no | @current |
| annotation-dedupe | If 'true', skip creating the annotation when a matching one already exists (idempotent re-runs). Match is by annotation-dedupe-key, or the full annotation text if no key is set. Defaults to 'false'. | no | false |
| annotation-dedupe-key | Content prefix used to detect an existing annotation when annotation-dedupe is true. Defaults to the full annotation text. Use a stable prefix (e.g. 'Deployed repo@sha to env') so a volatile suffix like a PR list doesn't defeat dedupe. | no | — |
Outputs
no outputs