Skip to content

Commit

Permalink
v1.0.0 release and readme quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmcb committed Jun 17, 2020
1 parent 2e811b7 commit b603439
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 8 deletions.
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,84 @@ This project is inspired by [Prow](https://github.com/kubernetes/test-infra/tree
## Quickstart

Run specified actions or jobs for issue and PR comments through a `workflow.yaml` file:
```yaml
name: "Prow github actions"
on:
issue_comment:
types: [created]

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/prow-github-actions
with:
prow-commands: '/assign
/unassign
/approve
/retitle
/area
/kind
/priority
/remove
/lgtm
/close
/reopen
/lock
/milestone
/hold
/cc
/uncc'
github-token: "${{ secrets.GITHUB_TOKEN }}"
```
Automatically label PRs every hour based on your `.github/labels.yaml`:
```yaml
name: "Label PRs from globs"
on:
schedule:
- cron: "0 * * * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/prow-github-actions
with:
jobs: 'pr-labeler'
github-token: "${{ secrets.GITHUB_TOKEN }}"
```

Your `.github/labels.yaml` may look like:
```yaml
# labels to be used with /area command
area:
- 'bug'
- 'important'
# File globs for PR labeler
tests:
- '**/*.test.ts'
```

You can automatically merge PRs based on a cron schedule if it contains the `lgtm` label:
```yaml
name: "Merge on lgtm label"
on:
schedule:
- cron: "0 * * * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/prow-github-actions
with:
jobs: 'lgtm'
github-token: "${{ secrets.GITHUB_TOKEN }}"
```

## Documentation
- [Overview](./docs/overview.md)
- [Commands](./docs/commands.md)
Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "typescript-action",
"version": "0.0.0",
"private": true,
"description": "TypeScript template action",
"name": "prow-github-actions",
"version": "1.0.0",
"description": "Slash commands, jobs, and chat-ops for Github actions inspired by Kubernetes Prow",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
Expand All @@ -16,14 +15,13 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/actions/typescript-action.git"
"url": "git+https://github.com/jpmcb/prow-github-actions.git"
},
"keywords": [
"actions",
"node",
"setup"
"prow"
],
"author": "YourNameOrOrganization",
"author": "John McBride",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.0",
Expand Down

0 comments on commit b603439

Please sign in to comment.