Prow github actions is an interface for Github actions
to behave much like the kubernetes Prow bot.
Prow is a CI/CD system that provides GitHub automation in the form of policy enforcement,
chat-ops via /foo style commands, and automatic PR merging.
This powerful system can be used for both large and small open source projects
to enable better project management and collaborator workflows.
This is achieved through utilizing Github actions CI/CD system
and removes much of the overhead and infrastructure needed for running the Prow bot.
Workflows are broken down into commands and jobs that can be run with specific Github "events"; events lists which ones the action routes.
One caller workflow installs everything through the reusable workflow; see installing.
The handlers under src/ reach the runtime they run on only through the Platform
interface in src/platform/types.ts: the event
(Context: event name, payload, repository), the seven inputs action.yml declares,
a logger, the API base url and fail(). The entry point installs an implementation with
setPlatform() (or runs each event under runWithPlatform()) before dispatching.
| Adapter | Entry point | Token | Events |
|---|---|---|---|
src/adapters/actions.ts |
dist/index.js (the action) |
GITHUB_TOKEN or the token secret |
the workflow's on: |
src/adapters/app/ |
dist-server/index.js (a container) or dist-worker/worker.js (Cloudflare Workers) — GitHub App, beta |
an installation token per event | the App's webhook subscriptions |
Everything a handler memoizes for an event — configuration, repository labels, OWNERS
trees, warnings already shown — lives in the platform's RunState, created once per
event by the adapter, so nothing carries over between events or repositories in a
long-lived process.
Handlers therefore import from ../platform, never from @actions/* or node:*;
ESLint rejects such imports outside src/adapters/, src/main.ts and src/server/, and
tsconfig.core.json type-checks the handlers with no Node types at all. This keeps the
door open to a second adapter, such as a GitHub App receiving webhooks, without touching
the handlers.
- Prow for your organization: the guided path
- Installing: one repository, an organization, upgrading
- Events the action routes
- Prow github actions available commands
- Labeling issues
- Automatically Labeling PRs (via
actions/labelerwithpull_request_target) - Automatic PR merging
- Jobs to run on PR update
- Examples
- Releasing
- Contributing