-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 1.11 KB
/
cherry-pick-bot.yml
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
name: Cherry Pick Bot
on:
issue_comment:
types: [created]
jobs:
cherry-pick:
if: contains(github.event.comment.body, '@.ymir cherry-pick') && github.event.comment.user.login == 'smallkirby'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app_id: ${{ vars.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
- name: Setup Python
run: |
uv python install
uv sync --all-extras
- name: Setup Git
run: |
git config --global user.name 'Cherry-Pick Bot'
git config --global user.email '[email protected]'
git fetch --all
- name: Run Cherry Pick Script
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_NUMBER: ${{ github.event.issue.number }}
REPO: ${{ github.repository }}
run: uv run .github/scripts/cherry-picker.py