Filtered translations from 11c90578f62e6a786132155fd7647d008f07d2a0 #563
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 | |