Repository navigation
58 lines (53 loc) · 2.22 KB
/
Copy pathprow-bot.yml
File metadata and controls
58 lines (53 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This repository runs the bot through its own reusable workflow; templates/workflow-templates/prow.yml
# is the same file for consumers, with pull_request_target and @v3.0.1. Kept on pull_request here, so
# fork pull requests are handled by the scheduled sweep like templates/workflow-templates/prow-pull-request.yml.
name: Prow bot
on:
issues:
types: [opened, reopened, labeled, unlabeled]
issue_comment:
types: [created]
pull_request:
types: [opened, reopened, synchronize, ready_for_review, labeled, unlabeled]
pull_request_review:
types: [submitted, dismissed]
check_suite:
types: [completed]
schedule:
- cron: '*/20 * * * *'
workflow_dispatch:
push:
branches: [main]
paths: [.github/prow.yaml]
# the reusable workflow can use at most what is granted here
permissions:
contents: write
issues: write
pull-requests: write
statuses: write
actions: write
# One run per comment (commands are never collapsed); per event+action for everything else,
# so a pending `synchronize` run can only be superseded by a newer `synchronize` run.
# Never cancel a run that may be merging.
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:
# commands, plugins and event-driven merging
prow:
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push' && github.event_name != 'schedule'
uses: ./.github/workflows/prow.yml
with:
prow-commands: /assign /unassign /approve /retitle /area /kind /priority /label /remove /lgtm /close /reopen /lock /milestone /hold /cc /uncc /meow /lifecycle /help /triage /check-required-labels /retest /test /ok-to-test
# fork pull requests (read-only token under pull_request) updated within sweep.lookback, plus the lgtm backstop
sweep:
if: github.event_name == 'schedule'
uses: ./.github/workflows/prow.yml
with:
jobs: sweep lgtm
# on demand and whenever .github/prow.yaml changes on main
label-sync:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
uses: ./.github/workflows/prow.yml
with:
jobs: label-sync