add V1.0.5.1 #50
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: Check the translation for errors | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'Translation/**/*.yml' # Include yml files in Translation and all its subfolders | |
jobs: | |
check-trans: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone main git repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: master | |
path: MAIN_REPO | |
- name: Checkout pull request | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
path: PR_REPO # Files will be checked out to the 'PR-REPO' directory | |
# Install Python | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: pip install ruamel.yaml | |
# Step to run the Python script and capture errors | |
- name: Check YML | |
run: | | |
set -o pipefail # Ensure the script fails if Python script fails | |
python MAIN_REPO/WorkflowScripts/sync_translations.py 2>&1 | tee python_output.log || (cat python_output.log && exit 1) |