-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (57 loc) · 1.98 KB
/
auto_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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Auto Translate
on:
push:
branches:
- 'feature/auto-translate'
paths:
- 'docs/app-router/**'
permissions:
contents: write
pull-requests: write
jobs:
auto-translate:
runs-on: ubuntu-latest
steps:
# feature/auto-translateへcheckout
- name: checkout code
uses: actions/checkout@v4
with:
ref: feature/auto-translate
# ファイル取得、翻訳、ファイル上書き処理
- name: check and get changed files
run: bash auto_translate/script/check_change.sh "${{ secrets.GITHUB_TOKEN }}"
- name: translation with chatGPT
run: bash auto_translate/script/translate.sh
# 変更内容のadd、commit、push処理
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Add changes to Git
run: |
git add .
- name: Commit changes
run: |
git commit -m "Automated commit from GitHub Actions"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin HEAD:${{ github.ref }}
# Pull Requestの作成
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Automated commit from GitHub Actions"
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
branch: feature/auto-translate
title: "自動翻訳結果"
body: |
Next.jsの公式ドキュメントに更新があり、自動翻訳を行いました。
翻訳結果を確認してください。
base: main
labels: taranslate
# delete-branch: true
# assignees:
# reviewers: