Skip to content

Commit

Permalink
(chore) Add GitHub Actions flows to automate Transifex (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jan 16, 2024
1 parent 96619c9 commit 5c6783d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tx-pull.yml
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 }}
21 changes: 21 additions & 0 deletions .github/workflows/tx-push.yml
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 }}

1 comment on commit 5c6783d

@befantasy
Copy link
Contributor

@befantasy befantasy commented on 5c6783d Jan 22, 2024

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.

Please sign in to comment.