sourcemod/.github/workflows/translations.yml
peace-maker 4eecc80b9a
Fix translations workflow (#1963)
* Fix translations workflow

* Temporarily trigger workflow for PRs

* Trigger without a PR

* Just work please

* Update github-app-token dependency

* Update workflow step name

* Disable on PRs again
2023-03-30 02:28:03 +02:00

43 lines
1.1 KiB
YAML

name: Update translation project
on:
push:
branches:
- master
paths:
- 'translations/**'
workflow_dispatch:
jobs:
update_translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
name: Setup Python 3.10
with:
python-version: "3.10"
- name: Install Python dependencies
working-directory: tools/language_check
run: |
python -m pip install --upgrade -r requirements.txt
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PEM }}
- name: Update translation project
working-directory: tools/language_check
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ORGANIZATION: alliedmodders
PROJECT_NUMBER: 1
run: |
python ./compare_translation_phrases.py