Files
wavelog/.github/workflows/translation.yml
2024-07-12 22:53:39 +02:00

47 lines
1.1 KiB
YAML

name: Run the po generator script
on:
push:
branches:
- dev
jobs:
build:
if: github.repository == 'wavelog/wavelog'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: wavelog/wavelog
ref: dev
- name: Set up gettext
run: sudo apt-get install -y gettext
- name: Run all po_gen scripts
run: |
./po_gen.sh
./install/po_gen_installer.sh
- name: Commit changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add .
git commit -m "po/mo updates"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Command Weblate to perform a pull
env:
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
WEBLATE_URL: ${{ secrets.WEBLATE_URL }}
run: |
sleep 2
curl --silent \
-d operation=pull \
-H "Authorization: Token $WEBLATE_TOKEN" \
$WEBLATE_URL