-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) Add GitHub Actions flows to automate Transifex (#887)
- Loading branch information
Showing
2 changed files
with
52 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,31 @@ | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# every day at 8 PM UTC | ||
- cron: "0 20 * * *" | ||
|
||
name: "Scheduled Transifex Update" | ||
|
||
jobs: | ||
pull-translations-from-transifex: | ||
name: pull-translations-from-transifex | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
args: pull | ||
with: | ||
token: ${{ secrets.TRANSIFEX_TOKEN }} | ||
- name: Create PR if necessary | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: "(chore) Update translations from Transifex" | ||
title: "(chore) Update translations from Transifex" | ||
body: "Automated updates of translations pulled from Transifex" | ||
branch: "chore/update-transifex" | ||
author: "OpenMRS Bot <[email protected]>" | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,21 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
|
||
name: "Update Transifex on Push" | ||
|
||
jobs: | ||
push-translations-to-transifex: | ||
name: push-translations-to-transifex | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
with: | ||
token: ${{ secrets.TRANSIFEX_TOKEN }} |