This project is inspired by Prow and brings its chat-ops functionality and project management to a simple, Github actions workflow.
Prow is a Kubernetes based CI/CD system ... and provides GitHub automation in the form of policy enforcement, chat-ops via /foo style commands, and automatic PR merging.
Setting up an organization? Start with Prow for your organization.
Check out the "EXAMPLE" issues and pull requests (open and closed) in this repo to see how this works!
One caller workflow installs the whole bot. Copy templates/workflow-templates/prow.yml
to .github/workflows/prow.yml, or install Prow from Actions → New workflow once your
organization ships it as a workflow template. Policy
forbids pull_request_target? Use prow-pull-request.yml
instead (without pull_request_target):
name: Prow
on:
issues:
types: [opened, reopened, labeled, unlabeled]
issue_comment:
types: [created]
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review, labeled, unlabeled]
pull_request_review:
types: [submitted, dismissed]
check_suite:
types: [completed]
schedule:
- cron: '0 * * * *'
workflow_dispatch:
push:
branches: [main]
paths: [.github/prow.yaml]
permissions:
contents: write
issues: write
pull-requests: write
statuses: write
actions: write
concurrency:
group: prow-${{ github.event_name }}-${{ github.event.action }}-${{ github.event.comment.id || github.event.pull_request.number || github.event.issue.number || github.run_id }}
cancel-in-progress: false
jobs:
prow:
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push'
uses: cncf/prow-github-actions/.github/workflows/prow.yml@v3
label-sync:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: cncf/prow-github-actions/.github/workflows/prow.yml@v3
with:
jobs: label-syncWith no configuration at all this gives you every built-in /command (/retest and /test re-run
the pull request's GitHub Actions runs, /ok-to-test approves a first-time contributor's held runs), reviewers from OWNERS
files, fork-safe automatic merging on lgtm (plus approved when the repository has
OWNERS files) where lgtm is
bound to the reviewed commit and never
merges commits pushed after it, and the label-sync job (run it once from
Actions → Prow → Run workflow so the labels exist). Add a prow.yaml to the repository or to
your organization's .github repository for label families and needs-* rules
(starter, configuration). The
Installing guide covers organizations, upgrading, inputs and secrets.
These docs describe main. The next release is v3.0.0; it creates the floating v3 tag
the caller above references, and until then @main is the only ref of the reusable workflow
that resolves (releasing). The action requires the node24 runtime
(GitHub requires actions/runner 2.327.1 or newer for node24 on self-hosted runners).
The action can also be a step of your own workflow, which is the form for GitHub Enterprise Server (the reusable workflow needs github.com) and for mixing it with other steps:
name: Prow github actions
on:
issue_comment:
types: [created]
permissions:
issues: write
pull-requests: write
statuses: write
actions: write
contents: read
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: cncf/prow-github-actions@v3
with:
prow-commands: /assign /unassign /cc /uncc /approve /lgtm /hold /close /reopen /lock /retitle /milestone /remove /area /kind /priority /label /lifecycle /stage /status /help /good-first-issue /retest /test /ok-to-test /meow
github-token: '${{ secrets.GITHUB_TOKEN }}'This is the full list of available commands. Prow-style aliases (/unhold, /remove-kind, ...) come with their base command, and listing an alias enables the whole command family. Events has the direct form subscribed to everything; jobs, automatic merging and PR jobs have the per-feature workflows.
- Prow for your organization
- Installing
- Overview
- Events
- Commands
- Configuration
- Labeling
- Jobs (lgtm merger, label-sync)
- Automatic PR merging (event-driven, upgrading from the
holdlabel) - PR jobs
- Examples
- Releasing
- Contributing
open water breeze
the ocean seas are endless
forward to the prow