Auto translate PR message (#15) #8
This file contains 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
name: Auto-translate strings.xml | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
perform-auto-translate: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Translate strings.xml to supported languages | |
id: translate | |
uses: duartebarbosadev/Android-String-Translator@main | |
#with: | |
# Adjust the project_path if your Android resource files are elsewhere. | |
#project_path: "./app/src/main/res" | |
#auto_translate: "true" | |
#validate_translations: "false" | |
#log_trace: "false" | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
#token: ${{ secrets.PAT }} | |
commit-message: "[Translate Bot] Auto-generated translations for non-English languages" | |
committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | |
author: "${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>" | |
signoff: "false" | |
title: "[Translate Bot] Auto-generated translations for non-English languages" | |
body: | | |
Auto-generated translations have been produced by the translation bot. | |
**Translation Report:** | |
${{ steps.translate.outputs.translation_report }} | |
This pull request was automatically generated. | |
labels: "translation, automated pr" | |
assignees: "duartebarbosadev" | |
reviewers: "duartebarbosadev" |