-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
38 lines (36 loc) · 1.06 KB
/
on-pr-labeled.yml
File metadata and controls
38 lines (36 loc) · 1.06 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
name: On PR labeled
on:
pull_request:
types:
- labeled
jobs:
automerge:
name: Auto Merge
if: >
github.event.label.name == 'automerge' &&
github.repository == 'JabRef/jabref' &&
github.event.pull_request.head.repo.full_name == 'JabRef/jabref'
runs-on: ubuntu-slim
steps:
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE}}
- name: Merge PR
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GH_TOKEN_UPDATE_GRADLE_WRAPPER}}
upload-pr-nnumber:
runs-on: ubuntu-slim
permissions:
contents: read
actions: write
steps:
- name: Create pr_number.txt
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt
- uses: actions/upload-artifact@v7
with:
name: pr_number
path: pr_number.txt