-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rahu] | BAH-3644 | Add. Workflow To Pull Translations
This workflow is designed to retrieve translations from Transifex once every month in case resources are updated.
- Loading branch information
1 parent
da37fd1
commit 9d2d3ac
Showing
3 changed files
with
56 additions
and
5 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
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
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,43 @@ | ||
name: Pull Translations from Transifex | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pull-translations: | ||
name: Pull Translations from Transifex | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Pull Translations from Transifex | ||
run: | | ||
bash .github/scripts/transifex.sh pull | ||
env: | ||
TX_TOKEN: ${{ secrets.TX_TOKEN }} | ||
|
||
- name: Commit and push changes | ||
id: auto-commit-action | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "[Bahmni Infra] | Add. Update Translation Resources" | ||
branch: ${{ github.ref }} | ||
file_pattern: 'openmrs/i18n/**/*.json' | ||
repository: . | ||
commit_user_name: Bahmni Infra | ||
commit_user_email: [email protected] | ||
commit_author: bahmni-infra <[email protected]> | ||
|
||
- name: Check for changes | ||
run: | | ||
if [[ steps.auto-commit-action.outputs.changes_detected == 'true' ]]; then | ||
echo "Changes Detected. Translation Resources Updated." | ||
else | ||
echo "No Changes Detected. Project Already Up-To-Date." | ||
fi |