|
20 | 20 | uses: actions/checkout@v6 |
21 | 21 | with: |
22 | 22 | fetch-depth: 0 |
23 | | - persist-credentials: false |
24 | 23 | - id: md_files |
25 | 24 | run: | |
26 | 25 | FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'docs/*.md') |
@@ -51,19 +50,19 @@ jobs: |
51 | 50 | FIX_MARKDOWN: true |
52 | 51 | - name: Create Pull Request |
53 | 52 | if: steps.md_files.outputs.found == 'true' |
54 | | - uses: peter-evans/create-pull-request@v8 |
55 | 53 | env: |
56 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
57 | | - with: |
58 | | - title: "docs: update translations" |
59 | | - commit-message: "docs: update translations" |
60 | | - committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
61 | | - author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> |
62 | | - branch: translations/${{ github.run_id }} |
63 | | - delete-branch: true |
64 | | - body: | |
65 | | - Translation updates for: ${{ steps.md_files.outputs.files }}. |
66 | | - labels: | |
67 | | - translations |
68 | | - bot |
69 | | - draft: false |
| 54 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + run: | |
| 56 | + git config user.name "github-actions[bot]" |
| 57 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 58 | + BRANCH="translations/${{ github.run_id }}" |
| 59 | + git checkout -b "$BRANCH" |
| 60 | + git add docs/ |
| 61 | + git diff --cached --quiet && exit 0 |
| 62 | + git commit -m "docs: update translations" --author="${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>" |
| 63 | + git push origin "$BRANCH" |
| 64 | + gh pr create \ |
| 65 | + --title "docs: update translations" \ |
| 66 | + --body "Translation updates for: ${{ steps.md_files.outputs.files }}." \ |
| 67 | + --label "translations" \ |
| 68 | + --label "bot" |
0 commit comments