-
Notifications
You must be signed in to change notification settings - Fork 189
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 (#937)
- 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:15 PM UTC | ||
- cron: "0 20 15 * *" | ||
|
||
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 | ||
with: | ||
token: ${{ secrets.TRANSIFEX_TOKEN }} | ||
args: pull | ||
- 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 <infrastructure@openmrs.org>" | ||
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 }} |
5c6783d
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.
hi,ibacher
I've been observing for a few days, and it seems like this action isn't executing at the scheduled time according to the cron settings. Do you know what the reason might be? The translations I updated in Transifex haven't been pulled back into GitHub.
And, there are some legacy resources left on Transifex, such as esm-outpatient-app and esm-patient-list-app.