-
Notifications
You must be signed in to change notification settings - Fork 90
46 lines (41 loc) · 1.32 KB
/
weblate-sync-po.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
43
44
45
46
name: weblate-sync-po
on:
schedule:
# Run this on Tuesday evening (UTC), so that it's ready for release on
# Wednesday, with some spare time
- cron: '0 18 * * 2'
# can be run manually on https://github.com/cockpit-project/cockpit/actions
workflow_dispatch:
jobs:
po-refresh:
environment: self
permissions:
pull-requests: write
statuses: write
runs-on: ubuntu-latest
steps:
- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends gettext
- name: Clone source repository
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
path: src
- name: Clone weblate repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}-weblate
path: weblate
- name: Copy .po files from weblate repository
run: cp weblate/*.po src/po/
- name: Run po-refresh bot
run: |
cd src
make bots
git config --global user.name "GitHub Workflow"
git config --global user.email "cockpituous@cockpit-project.org"
mkdir -p ~/.config/cockpit-dev
echo ${{ github.token }} >> ~/.config/cockpit-dev/github-token
PO_REFRESH_NO_SYNC=1 bots/po-refresh