2023-03-29 16:23:05 +02:00
|
|
|
name: Update translation project
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- 'translations/**'
|
2023-03-30 01:13:40 +02:00
|
|
|
workflow_dispatch:
|
2023-03-29 16:23:05 +02:00
|
|
|
jobs:
|
|
|
|
update_translations:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-13 18:29:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-30 02:28:03 +02:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2023-03-29 16:23:05 +02:00
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
name: Setup Python 3.10
|
|
|
|
with:
|
2023-03-30 01:13:40 +02:00
|
|
|
python-version: "3.10"
|
2023-03-29 16:23:05 +02:00
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
working-directory: tools/language_check
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade -r requirements.txt
|
|
|
|
|
|
|
|
- name: Generate token
|
|
|
|
id: generate_token
|
2023-09-25 17:35:50 +02:00
|
|
|
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
2023-03-29 16:23:05 +02:00
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.APP_ID }}
|
|
|
|
private_key: ${{ secrets.APP_PEM }}
|
|
|
|
|
2023-03-30 02:28:03 +02:00
|
|
|
- name: Update translation project
|
2023-03-29 16:23:05 +02:00
|
|
|
working-directory: tools/language_check
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
|
|
|
|
ORGANIZATION: alliedmodders
|
|
|
|
PROJECT_NUMBER: 1
|
|
|
|
run: |
|
|
|
|
python ./compare_translation_phrases.py
|
|
|
|
|