Scheduled Transifex Update #31
This file contains hidden or 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
on: | |
workflow_dispatch: # Allow manual trigger | |
schedule: | |
# Runs daily at 7:30 PM UTC | |
- cron: '30 19 * * *' | |
name: "Scheduled Transifex Update" | |
jobs: | |
pull-translations-from-transifex: | |
name: pull-translations-from-transifex | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: 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 --force --all | |
- name: 🔄 Create PR if necessary | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: '(chore) Update translations from Transifex' | |
title: '(chore) Update translations from Transifex' | |
body: | | |
# OpenMRS Translation Updates | |
This PR contains updates to the translations pulled from Transifex | |
> This PR was automatically generated and will be automatically merged if checks pass. | |
branch: 'chore/update-transifex' | |
author: 'OpenMRS Bot <infrastructure@openmrs.org>' | |
token: ${{ secrets.OMRS_BOT_GH_TOKEN }} | |
- name: ✅ Auto approve PR | |
if: steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated' | |
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🔀 Automerge PR | |
if: steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated' | |
run: gh pr merge --auto --squash "${{ steps.cpr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.OMRS_BOT_GH_TOKEN }} |