get core translations #22
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: get core translations | |
on: | |
schedule: | |
- cron: "50 5 * * *" | |
workflow_dispatch: | |
jobs: | |
get: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone jeedom/core alpha | |
uses: GuillaumeFalourd/clone-github-repo-action@main | |
with: | |
owner: 'jeedom' | |
repository: 'core' | |
branch: 'alpha' | |
depth: 1 | |
- name: list cloned repository content | |
run: | | |
ls -la core/core/i18n | |
- uses: actions/checkout@v4 | |
with: | |
path: 'translations' | |
- name: Compile all translations prompts | |
run: | | |
python translations/src/compile_core_translations.py --source core/core/i18n --destination $GITHUB_WORKSPACE/translations | |
- name: "Commit changes" | |
run: | | |
cd $GITHUB_WORKSPACE/translations | |
ls -la | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add *.json | |
git diff --cached --quiet || git commit -m 'update translations' | |
git push |