-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (37 loc) · 1.22 KB
/
weblate-sync-pot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: weblate-sync-pot
on:
schedule:
# Run this every morning
- cron: '45 2 * * *'
# can be run manually on https://github.com/rhinstaller/anaconda-webui/actions
workflow_dispatch:
jobs:
pot-upload:
environment: anaconda-webui-l10n
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends npm make gettext appstream
- name: Clone source repository
uses: actions/checkout@v3
with:
path: src
- name: Generate .pot file
run: make -C src po/anaconda-webui.pot
- name: Clone weblate repository
uses: actions/checkout@v3
with:
path: weblate
repository: ${{ github.repository }}-l10n
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Commit .pot to weblate repo
run: |
cp src/po/anaconda-webui.pot weblate/anaconda-webui.pot
git config --global user.name "GitHub Workflow"
git config --global user.email "[email protected]"
git -C weblate commit -m "Update source file" -- anaconda-webui.pot
git -C weblate push