weblate-sync-po #61
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/rhinstaller/anaconda-webui/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@v3 | |
with: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
path: src | |
- name: Clone weblate repository | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }}-l10n | |
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 | |
COVERAGE_THRESHOLD=0 bots/po-refresh |