This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prince/create a workflow to update translators branch (#5859)
* chore: create a workflow to update translators branch * chore: remove crowdin command * chore: updated emoji * fix: updated plugins version
- Loading branch information
1 parent
82e55e5
commit 3ae9830
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Sync Translators Branch | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: write | ||
pull-requests: write | ||
statuses: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master*' | ||
|
||
jobs: | ||
sync-translation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '18.x' | ||
- name: Sync Master to Translators branch 🔀 | ||
run: | | ||
branch_name="master_translations" | ||
echo "Setting up Git identity" | ||
git config --global user.name "DerivFE" | ||
git config --global user.email "[email protected]" | ||
echo "Checking out new branch [$branch_name]" | ||
git checkout -b "$branch_name" | ||
# Force push to this branch in case a previous run created it. | ||
git push --set-upstream origin "$branch_name" -f | ||
sudo apt install gh | ||
gh auth login --with-token <<< ${{ github.token }} | ||
gh pr close "$branch_name" || true | ||
gh pr create --base "translators" --head "binary-com:$branch_name" --body "This is an automated PR designed to keep the translators' branch up to date, ensuring that all newly added strings are available for translation." | ||
3ae9830
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
deriv-com – ./
deriv-com-git-master.binary.sx
deriv-com.binary.sx