Skip to content

Commit f2bf6d7

Browse files
authored
Merge pull request #1700 from sbrunner/ci-upgrade
CI updates
2 parents e5f6088 + 6fccefa commit f2bf6d7

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Auto reviews, merge and close pull requests
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
jobs:
9+
auto-merge:
10+
name: Auto reviews pull requests from bots
11+
runs-on: ubuntu-22.04
12+
timeout-minutes: 5
13+
14+
permissions:
15+
pull-requests: write
16+
steps:
17+
- name: Print event
18+
run: echo "${GITHUB}" | jq
19+
env:
20+
GITHUB: ${{ toJson(github) }}
21+
- name: Print context
22+
uses: actions/github-script@v8
23+
with:
24+
script: |-
25+
console.log(context);
26+
- name: Auto reviews GHCI updates
27+
uses: actions/github-script@v8
28+
if: |-
29+
startsWith(github.head_ref, 'ghci/audit/')
30+
&& (github.event.pull_request.user.login == 'geo-ghci-test[bot]'
31+
|| github.event.pull_request.user.login == 'geo-ghci-int[bot]'
32+
|| github.event.pull_request.user.login == 'geo-ghci[bot]')
33+
with:
34+
script: |-
35+
github.rest.pulls.createReview({
36+
owner: context.repo.owner,
37+
repo: context.repo.repo,
38+
pull_number: context.payload.pull_request.number,
39+
event: 'APPROVE',
40+
})
41+
- name: Auto reviews Renovate updates
42+
uses: actions/github-script@v8
43+
if: |-
44+
github.event.pull_request.user.login == 'renovate[bot]'
45+
with:
46+
script: |-
47+
github.rest.pulls.createReview({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
pull_number: context.payload.pull_request.number,
51+
event: 'APPROVE',
52+
})

0 commit comments

Comments
 (0)