Skip to content

Commit 0d83ba8

Browse files
committed
add prow github gitactions
Signed-off-by: Jooho Lee <[email protected]>
1 parent 850f80e commit 0d83ba8

File tree

6 files changed

+107
-0
lines changed

6 files changed

+107
-0
lines changed

.github/workflows/prow-github.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Run specified actions or jobs for issue and PR comments
2+
3+
name: "Prow github actions"
4+
on:
5+
issue_comment:
6+
types: [created]
7+
8+
# Grant additional permissions to the GITHUB_TOKEN
9+
permissions:
10+
# Allow labeling issues
11+
issues: write
12+
# Allow adding a review to a pull request
13+
pull-requests: write
14+
15+
jobs:
16+
prow-execute:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: jpmcb/[email protected]
20+
with:
21+
github-token: "${{ secrets.GITHUB_TOKEN }}"
22+
prow-commands: "/assign
23+
/unassign
24+
/approve
25+
/retitle
26+
/area
27+
/kind
28+
/priority
29+
/remove
30+
/lgtm
31+
/close
32+
/reopen
33+
/lock
34+
/milestone
35+
/hold
36+
/cc
37+
/uncc"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This Github workflow will check every hour for PRs with the lgtm label and will attempt to automatically merge them.
2+
# If the hold label is present, it will block automatic merging.
3+
4+
name: "Prow merge on lgtm label"
5+
on:
6+
schedule:
7+
- cron: "0 * * * *" # every hour
8+
9+
jobs:
10+
auto-merge:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: jpmcb/[email protected]
14+
with:
15+
jobs: 'lgtm'
16+
github-token: "${{ secrets.GITHUB_TOKEN }}"
17+
merge-method: 'squash'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Run Jobs on PR
2+
on: pull_request
3+
4+
jobs:
5+
execute:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: jpmcb/[email protected]
9+
with:
10+
jobs: lgtm
11+
github-token: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/re-run-action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Re-Run PR tests
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
rerun_pr_tests:
9+
name: rerun_pr_tests
10+
if: ${{ github.event.issue.pull_request }}
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: estroz/rerun-actions@main
14+
with:
15+
repo_token: ${{ secrets.GITHUB_TOKEN }}
16+
comment_id: ${{ github.event.comment.id }}

.prowlabels.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Labels for labeling issues and pull requests using GitHub prow action.
2+
kind:
3+
- 'bug'
4+
- 'security'
5+
- 'feature'
6+
- 'docs'
7+
8+
priority:
9+
- 'p0'
10+
- 'p1'
11+
- 'p2'

OWNERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
approvers:
2+
- elevran
3+
- kfirtoledo
4+
- kfswain
5+
- nilig
6+
- nirrozenbaum
7+
- shmuelk
8+
9+
reviewers:
10+
- elevran
11+
- kfirtoledo
12+
- kfswain
13+
- nilig
14+
- nirrozenbaum
15+
- shmuelk

0 commit comments

Comments
 (0)