From 0148ffe0d795f8c193cfca5ad677ef404b3d4eb0 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 10 Apr 2021 12:58:07 +0200 Subject: [PATCH] Add auto messages.po updater --- .github/workflows/transifex.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/transifex.yml diff --git a/.github/workflows/transifex.yml b/.github/workflows/transifex.yml new file mode 100644 index 000000000..80309f242 --- /dev/null +++ b/.github/workflows/transifex.yml @@ -0,0 +1,29 @@ +name: Check Transifex +on: [push, pull_request] + +jobs: + messages: + name: Check message.po changes + runs-on: ubuntu-latest + steps: + - name: Install gettext + run: sudo apt-get install gettext + + - name: Checkout + uses: actions/checkout@v2 + + - name: Run Xgettext + run: ./bin/run_xgettext.sh + + - name: Commit changed message.po + run: | + git config --local user.email "workflow@github.com" + git config --local user.name "GitHub Workflow" + git add ./view/lang/C/messages.po + git commit -m "Update message.po" || echo "Nothing to update" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }}