Filtered translations from c3a9869cdb6afbbe32418f92f23e2a12f0347c37 #575
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync English strings to Weblate branch | |
| on: | |
| push: | |
| branches: | |
| - beta | |
| jobs: | |
| sync-english: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout weblate branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: weblate | |
| fetch-depth: 0 | |
| token: ${{ secrets.PUSH_TOKEN }} | |
| - name: Configure Git user | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Sync English directories from main branch | |
| run: | | |
| DIRECTORIES=("app/src/main/res/values/strings.xml" "fastlane/metadata/android/en-US") | |
| MAIN_BRANCH="beta" | |
| WEBLATE_BRANCH="weblate" | |
| REMOTE="origin" | |
| MAIN_HASH=$(git rev-parse $REMOTE/$MAIN_BRANCH) | |
| git checkout $REMOTE/$MAIN_BRANCH -- "${DIRECTORIES[@]}" | |
| if ! git diff --quiet HEAD -- "${DIRECTORIES[@]}"; then | |
| git add "${DIRECTORIES[@]}" | |
| git commit -m "Sync English directories from $MAIN_HASH" | |
| git push $REMOTE $WEBLATE_BRANCH | |
| fi | |