Skip to content

πŸ”„ Scheduled Transifex Update #64

πŸ”„ Scheduled Transifex Update

πŸ”„ Scheduled Transifex Update #64

Workflow file for this run

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:
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
id: cpr
uses: peter-evans/[email protected]
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.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 }}