2021-08-05 11:57:48 +00:00
|
|
|
name: "Update translations"
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "05 07 * * 5"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
babel:
|
2023-08-11 14:01:54 +00:00
|
|
|
name: "create PR for additions from weblate"
|
2021-08-05 11:57:48 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
if: ${{ github.repository_owner == 'searxng' && github.ref == 'refs/heads/master' }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-15 10:42:21 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-08-05 11:57:48 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: '0'
|
|
|
|
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
|
|
|
|
- name: Set up Python
|
2024-10-02 15:08:07 +00:00
|
|
|
uses: actions/setup-python@v5
|
2021-08-05 11:57:48 +00:00
|
|
|
with:
|
2024-10-02 15:08:07 +00:00
|
|
|
python-version: '3.12'
|
2021-08-05 11:57:48 +00:00
|
|
|
architecture: 'x64'
|
|
|
|
- name: Cache Python dependencies
|
|
|
|
id: cache-python
|
2022-11-04 14:22:30 +00:00
|
|
|
uses: actions/cache@v3
|
2021-08-05 11:57:48 +00:00
|
|
|
with:
|
2022-11-04 14:22:30 +00:00
|
|
|
path: |
|
|
|
|
./local
|
|
|
|
./.nvm
|
|
|
|
./node_modules
|
2024-10-02 15:08:07 +00:00
|
|
|
key: python-ubuntu-20.04-3.12-${{ hashFiles('requirements*.txt', 'setup.py','.nvmrc', 'package.json') }}
|
2021-08-05 11:57:48 +00:00
|
|
|
- name: weblate & git setup
|
|
|
|
env:
|
|
|
|
WEBLATE_CONFIG: ${{ secrets.WEBLATE_CONFIG }}
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.config
|
|
|
|
echo "${WEBLATE_CONFIG}" > ~/.config/weblate
|
|
|
|
git config --global user.email "searxng-bot@users.noreply.github.com"
|
|
|
|
git config --global user.name "searxng-bot"
|
|
|
|
- name: Merge and push transation updates
|
|
|
|
run: |
|
2021-08-16 09:30:53 +00:00
|
|
|
make V=1 weblate.translations.commit
|
2021-08-05 11:57:48 +00:00
|
|
|
- name: Create Pull Request
|
|
|
|
id: cpr
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
|
2024-03-09 13:08:00 +00:00
|
|
|
commit-message: '[l10n] update translations from Weblate'
|
2021-08-05 11:57:48 +00:00
|
|
|
committer: searxng-bot <searxng-bot@users.noreply.github.com>
|
|
|
|
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
|
|
|
signoff: false
|
|
|
|
branch: translations_update
|
|
|
|
delete-branch: true
|
|
|
|
draft: false
|
2024-03-09 10:10:15 +00:00
|
|
|
title: '[l10n] update translations from Weblate'
|
2021-08-05 11:57:48 +00:00
|
|
|
body: |
|
2024-03-09 10:10:15 +00:00
|
|
|
update translations from Weblate
|
2021-08-05 11:57:48 +00:00
|
|
|
labels: |
|
|
|
|
translation
|