Update Weblate #4
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
# Get Weblate to commit and push changes to a PR, | |
# which will be auto-approved. | |
name: Update Weblate | |
on: | |
workflow_dispatch: {} | |
schedule: | |
# 6 in the morning | |
- cron: '0 6 * * *' | |
jobs: | |
update-weblate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.12 | |
- name: Install Weblate Client | |
run: pip install wlc | |
- name: Prepare client config | |
run: | | |
echo '[weblate]' >> .weblate | |
echo 'url = https://hosted.weblate.org/api/' >> .weblate | |
echo 'translation = hedy' >> .weblate | |
echo '[keys]' >> .weblate | |
echo 'https://hosted.weblate.org/api/ = ${{ secrets.WEBLATE_API_KEY }}' >> .weblate | |
- name: Weblate commands | |
run: | | |
wlc reset | |
wlc pull | |
wlc commit | |
wlc push | |