From 60be5f3790c38ac93e4830aae58c737e54e9c228 Mon Sep 17 00:00:00 2001 From: Anna Balaeva Date: Mon, 23 Oct 2023 16:05:11 +0300 Subject: [PATCH] ci: added workflow to update POT files --- .github/workflows/push-pot.yml | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/push-pot.yml diff --git a/.github/workflows/push-pot.yml b/.github/workflows/push-pot.yml new file mode 100644 index 0000000000..fb127fee51 --- /dev/null +++ b/.github/workflows/push-pot.yml @@ -0,0 +1,35 @@ +name: Push POTs +on: + push: + branches: + - 'test-weblate' + - '3.0' +permissions: + contents: write +jobs: + generate-pot: + runs-on: ubuntu-latest + container: tarantool/doc-builder:fat-4.3 + steps: + - uses: actions/checkout@v3 + + - name: Generate Portable Object Templates + run: | + cmake . + make update-pot + + - name: Commit generated pots + run: | + git config --global --add safe.directory /__w/doc/doc + git config --global user.name 'TarantoolBot' + git config --global user.email 'tarantoolbot@mail.ru' + + if [[ $(git status) =~ .*"nothing to commit".* ]]; then + echo "status=nothing-to-commit" + exit 0 + fi + + git add locale/en/ + git commit -m "updated pot" + git push origin test-weblate +