Skip to content

Load translations from Tolgee #31

Load translations from Tolgee

Load translations from Tolgee #31

name: Translation integrity
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
test-translations-and-approve:
if: contains(github.event.pull_request.labels.*.name, 'tolgee-ci')
runs-on: ubuntu-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout the repository
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test translations
id: tests
run: |
python scripts/verify_translations.py
continue-on-error: true
- name: Check on failures
if: steps.checkout.outcome != 'success' || steps.tests.outcome != 'success'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Tolgee-CI Changes failed verification'
})
exit 1
- name: Approve PR since checks are Ok
if: steps.checkout.outcome == 'success' && steps.tests.outcome == 'success'
uses: hmarr/auto-approve-action@v4
with:
review-message: "Tolgee-CI Changes have been approved since they passed testing"