Skip to content

Commit

Permalink
Add GitHub action to trigger a daily Weblate update
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Mar 11, 2024
1 parent 54b9d3b commit bb0197f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-weblate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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 '[keys]' >> .weblate
echo 'https://hosted.weblate.org/api/ = ${{ secrets.WEBLATE_API_KEY }}' >> .weblate
- name: Weblate commands
run: |
wlc changes hedy
wlc reset
wlc pull
wlc commit
wlc push

0 comments on commit bb0197f

Please sign in to comment.