weblate-sync-po #156
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
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-ostree/actions | |
workflow_dispatch: | |
jobs: | |
po-refresh: | |
permissions: | |
contents: write | |
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: | |
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 "[email protected]" | |
mkdir -p ~/.config/cockpit-dev | |
echo ${{ github.token }} >> ~/.config/cockpit-dev/github-token | |
PO_REFRESH_NO_SYNC=1 bots/po-refresh |