-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.23 KB
/
translate.yml
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
---
name: Automatically Translate Android App
on: # yamllint disable-line rule:truthy
pull_request:
branches: ["main"]
types: ['opened', 'edited', 'reopened', 'synchronize', 'ready_for_review']
paths:
- "**/strings.xml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Run locally with "act -j translateAndroid"
translateAndroid:
if: '! github.event.pull_request.draft'
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Translate strings.xml to supported languages
uses: gyund/android-auto-translate@delay
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
committer: "ashishb's Translation Bot <ashishb+android-auto-translate@ashishb.net>"
title: "[Bot]Auto-generated translations for non-English languages"
body: "Auto-generated translations by [Android Auto Translate](https://github.com/ashishb/android-auto-translate) bot"
branch: translate-pr-${{ github.head_ref }}