From 43fb701425648f423b0ee30ac7a82c96ffbd3174 Mon Sep 17 00:00:00 2001 From: Hintay Date: Tue, 30 Jul 2024 23:30:39 +0900 Subject: [PATCH] enhance: new integration method with Weblate to reduce issues with merging changes --- .github/workflows/branches.yml | 26 ++++++++++++++++---------- .weblate.ini | 3 +++ 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .weblate.ini diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 6186cbd5..a8a7da63 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -1,4 +1,4 @@ -name: Merge Branches +name: Synchronize Branches on: pull_request: @@ -10,17 +10,23 @@ on: - published jobs: - merge: + weblate: runs-on: ubuntu-latest if: github.event.pull_request.merged == true || github.event.action == 'published' steps: - - name: Checkout main branch + - name: Checkout uses: actions/checkout@v4 - with: - ref: 'main' - fetch-depth: 0 - - name: Merge dev to main branch - run: | - git merge --ff-only -- origin/dev - git push + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + cache: pip + + - name: Install wlc + run: pip install wlc + + - name: Update Repository + env: + WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }} + run: wlc --key $WEBLATE_TOKEN pull diff --git a/.weblate.ini b/.weblate.ini new file mode 100644 index 00000000..566d2f8b --- /dev/null +++ b/.weblate.ini @@ -0,0 +1,3 @@ +[weblate] +url = https://weblate.nginxui.com/api/ +translation = nginx-ui