Event subscriptions for Artifacts lifecycle events
Key Points
- Artifacts emit lifecycle events
- Consume events in Workers for CI/CD
- Account- and repository-level event types
Summary
Cloudflare Artifacts now emits lifecycle events you can subscribe to and consume from a Worker, enabling commit-driven automation (builds, deploys, review agents, etc.). You can use these events to trigger custom workflows when repositories are created, imported, pushed to, or otherwise changed.
Key Points
- Consume Artifacts events with a Worker to implement automation (CI/CD triggers, review bots, etc.).
- Available account-level events (source:
artifacts):repo.created,repo.deleted,repo.forked,repo.imported. - Available repository-level events (source:
artifacts.repo):pushed,cloned,fetched. - Typical flow: subscribe to the relevant event source, forward events to a Worker endpoint, parse the event payload and kick off builds/deploys or other actions.
- See Artifacts documentation for payload schemas, subscription setup, and delivery guarantees.
Actionable tips for engineers
- Use the
pushedevent to trigger incremental builds or deploy pipelines immediately after agent pushes. - Handle idempotency and retries in your Worker to avoid duplicate builds on redeliveries.
- Filter account vs repository sources to limit noise and permission scope.