Fix weapon pickup through walls (#1662) #211
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |