-
Notifications
You must be signed in to change notification settings - Fork 4.3k
43 lines (40 loc) Β· 1.61 KB
/
Copy pathtx-pull.yml
File metadata and controls
43 lines (40 loc) Β· 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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@v7.0.0
- 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/create-pull-request@v8.1.1
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.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 }}