forked from TTT-2/TTT2
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.78 KB
/
lang-parser.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
51
52
53
54
55
56
57
58
59
60
61
name: LangParser
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-language-files:
# guard against running on forks as they are probably not setup for this
if: github.repository_owner == 'TTT-2'
runs-on: ubuntu-latest
steps:
- name: Checkout ttt2 repo
uses: actions/checkout@v4
with:
path: ttt2
- name: Checkout language parser repo
uses: actions/checkout@v4
with:
repository: TTT-2/ttt2-language_parser
path: ttt2-language_parser
- name: run language parser
run: python ttt2-language_parser/parse.py --in "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --out "$GITHUB_WORKSPACE/ttt2/lua/terrortown/lang" --base en --ignore chef
- name: generate app token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
id: ci-update-language-files
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
path: ttt2
add-paths: "lua/terrortown/lang/*.lua"
commit-message: Update language files
branch: ci-update-language-files
title: "Language: Update language files"
body: |
Auto-generated by github actions and the [ttt2-language_parser](https://github.com/TTT-2/ttt2-language_parser)
labels: skip-changelog
- name: Setup PR automerge and squash
run: |
cd ttt2
gh pr merge ci-update-language-files --auto --squash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}