Skip to content

Commit

Permalink
enhance: new integration method with Weblate to reduce issues with me…
Browse files Browse the repository at this point in the history
…rging changes
  • Loading branch information
Hintay committed Jul 30, 2024
1 parent 6c7b644 commit 43fb701
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Merge Branches
name: Synchronize Branches

on:
pull_request:
Expand All @@ -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

- name: Setup Python
uses: actions/setup-python@v5
with:
ref: 'main'
fetch-depth: 0
python-version: '3.10'
cache: pip

- name: Install wlc
run: pip install wlc

- name: Merge dev to main branch
run: |
git merge --ff-only -- origin/dev
git push
- name: Update Repository
env:
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }}
run: wlc --key $WEBLATE_TOKEN pull
3 changes: 3 additions & 0 deletions .weblate.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[weblate]
url = https://weblate.nginxui.com/api/
translation = nginx-ui

0 comments on commit 43fb701

Please sign in to comment.