|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
7 | | - - '**' # just for testing this pr itself |
8 | 7 |
|
9 | 8 | jobs: |
10 | 9 | generate-translations: |
@@ -44,30 +43,18 @@ jobs: |
44 | 43 | run: ./gradlew updateStringsXml |
45 | 44 |
|
46 | 45 | - name: Generate Translations |
| 46 | + env: |
| 47 | + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
47 | 48 | run: ./gradlew generateTranslations |
48 | 49 |
|
49 | | - - name: Check for changes |
50 | | - run: | |
51 | | - if [[ -n "$(git status --porcelain)" ]]; then |
52 | | - echo "Changes detected." |
53 | | - git config user.name "github-actions[bot]" |
54 | | - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
55 | | - git checkout -b update-translations |
56 | | - git add . |
57 | | - git commit -m "Update translations" |
58 | | - else |
59 | | - echo "No changes detected." |
60 | | - echo "::set-output name=changes::false" |
61 | | - fi |
62 | | - id: changes-check |
63 | | - |
64 | 50 | - name: Create Pull Request |
65 | 51 | if: steps.changes-check.outputs.changes != 'false' |
66 | 52 | uses: peter-evans/create-pull-request@v5 |
67 | 53 | with: |
68 | | - branch: update-translations |
69 | | - title: "Update Translations" |
70 | | - body: | |
71 | | - This PR updates the translations by running `./gradlew updateStringsXml` and `./gradlew generateTranslations`. |
| 54 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + title: "Update Translations ${{ github.event.pull_request.number }}" |
| 56 | + body: "Update Translations ${{ github.event.pull_request.number }}" |
| 57 | + branch: i18n-${{ github.event.pull_request.number }} |
| 58 | + base: main |
72 | 59 | labels: | |
73 | 60 | translations |
0 commit comments