Skip to content

Update credits

Update credits #500

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