Browse Source

Create pull request for downloaded languages

CPK 5 months ago
parent
commit
e0dcc64124
1 changed files with 13 additions and 1 deletions
  1. 13 1
      .github/workflows/localization.yml

+ 13 - 1
.github/workflows/localization.yml

@@ -16,6 +16,7 @@ on:
 
 permissions:
   contents: write
+  pull-requests: write
 
 jobs:
   compare-upload:
@@ -68,4 +69,15 @@ jobs:
           git commit -m "Update language files"
       - name: Push changes
         run: |
-          git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
+          git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
+      - name: Create Pull Request
+        run: |
+          gh pr create --title "Language Update ${{ github.run_number }}" \
+                --body "This PR was created automatically.
+
+                [GitHub Actions Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})/jobs/${{ github.job }}" \
+                --base main \
+                --head $(git rev-parse --abbrev-ref HEAD)
+          gh pr edit --add-reviewer ${{ github.actor }}
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}