forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 49
50 lines (42 loc) · 1.7 KB
/
merge_upstream.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
41
42
43
44
45
46
47
48
49
50
name: Merge Upstream
on:
workflow_dispatch:
jobs:
merge-upstream:
runs-on: ubuntu-latest
steps:
- id: create_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub openai
- name: Download the script
run: |
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/changelog/changelog_utils.py
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/merge-upstream/merge_upstream.py
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/tools/merge-upstream/translation_context.txt
- name: Run the script
env:
GITHUB_TOKEN: ${{ env.GH_TOKEN }}
TARGET_REPO: 'ss220club/BandaStation'
TARGET_BRANCH: 'master'
UPSTREAM_REPO: 'tgstation/tgstation'
UPSTREAM_BRANCH: 'master'
MERGE_BRANCH: 'merge-upstream'
CHANGELOG_AUTHOR: 'tgstation'
TRANSLATE_CHANGES: 'true'
OPENAI_API_KEY: ${{ secrets.ORG_EMPTY_TOKEN }}
LOG_LEVEL: ${{ runner.debug && 'DEBUG' || 'INFO' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Upstream Sync"
python3 -u merge_upstream.py