ci: make a CI script to automatically update translations when they change

This commit is contained in:
Tyler Wilding
2023-02-23 22:08:01 -05:00
parent a45d69bae2
commit 166eaee3da
@@ -0,0 +1,35 @@
name: Update Translations
on:
push:
branches:
- master
paths:
- 'localization/**'
workflow_dispatch: {}
jobs:
update-controller-db:
if: github.repository == 'open-goal/jak-project'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_PAT }}
- name: Update the translations
run: |
python ./localization/append-context.py
python ./localization/update-translations.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.BOT_PAT }}
author: 'OpenGOALBot <OpenGOALBot@users.noreply.github.com>'
committer: 'OpenGOALBot <OpenGOALBot@users.noreply.github.com>'
branch: 'bot/update-translations'
base: "master"
body: "Updating Translations"
commit-message: "ci: updated translations"
title: "CI: Updating Translation Files"