Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) Add GitHub Actions flows to automate Transifex #887

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 }}
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 }}
Loading