File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed
Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 3232 run : |
3333 echo "files=$(git diff --diff-filter=d --name-only HEAD^ HEAD | grep '\.md$' | grep -v 'cn' | sed -e 's/^/.\//' | tr '\n' ' ')" >> $GITHUB_OUTPUT
3434
35+ - name : Read prompt from file
36+ id : prompt
37+ run : |
38+ prompt_value=$(cat .github/workflows/prompt.txt | sed ':a;N;$!ba;s/\n/\\n/g')
39+ echo "prompt=$prompt_value" >> $GITHUB_OUTPUT
40+
3541 - name : Run GPT Translate
36423743 with :
4046 inputFiles : " ${{ steps.changed_files.outputs.files }}"
4147 outputFiles : " docs/cn/**/*.md"
4248 languages : " Simplified-Chinese"
43- prompt : " $(cat .github/workflows/ prompt.txt) "
49+ prompt : " ${{ steps. prompt.outputs.prompt }} "
4450 basePath : ${{ secrets.BASE_URL }}
Original file line number Diff line number Diff line change 4646 echo "Markdown Files Missing: ${{ steps.check_missing.outputs.missing_md_files }}"
4747 echo "JSON Files Missing: ${{ steps.check_missing.outputs.missing_json_files }}"
4848
49+ - name : Read prompt from file
50+ id : prompt
51+ run : |
52+ prompt_value=$(cat .github/workflows/prompt.txt | sed ':a;N;$!ba;s/\n/\\n/g')
53+ echo "prompt=$prompt_value" >> $GITHUB_OUTPUT
54+
4955 - name : Run GPT Translate
50565157 with :
5460 inputFiles : " ${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
5561 outputFiles : " docs/cn/**/*.{md,json}"
5662 languages : " Simplified-Chinese"
57- prompt : " $(cat .github/workflows/ prompt.txt) "
63+ prompt : " ${{ steps. prompt.outputs.prompt }} "
5864 basePath : ${{ secrets.BASE_URL }}
Original file line number Diff line number Diff line change 4646 echo "Markdown Files Missing: ${{ steps.check_missing.outputs.missing_md_files }}"
4747 echo "JSON Files Missing: ${{ steps.check_missing.outputs.missing_json_files }}"
4848
49+ - name : Read prompt from file
50+ id : prompt
51+ run : |
52+ prompt_value=$(cat .github/workflows/prompt.txt | sed ':a;N;$!ba;s/\n/\\n/g')
53+ echo "prompt=$prompt_value" >> $GITHUB_OUTPUT
54+
4955 - name : Run GPT Translate
50565157 with :
5460 inputFiles : " ${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
5561 outputFiles : " docs/cn/**/*.{md,json}"
5662 languages : " Simplified-Chinese"
57- prompt : " $(cat .github/workflows/ prompt.txt) "
63+ prompt : " ${{ steps. prompt.outputs.prompt }} "
5864 basePath : ${{ secrets.BASE_URL }}
Original file line number Diff line number Diff line change @@ -11,12 +11,18 @@ jobs:
1111 steps :
1212 - uses : actions/checkout@v4
1313
14+ - name : Read prompt from file
15+ id : prompt
16+ run : |
17+ prompt_value=$(cat .github/workflows/prompt.txt | sed ':a;N;$!ba;s/\n/\\n/g')
18+ echo "prompt=$prompt_value" >> $GITHUB_OUTPUT
19+
1420 - name : Run GPT Translate
1521 if : |
1622 contains(github.event.comment.body, '/gt')
17231824 with :
1925 apikey : ${{ secrets.API_KEY }}
2026 model : ${{ secrets.LLM_MODEL }}
21- prompt : " $(cat .github/workflows/ prompt.txt) "
27+ prompt : " ${{ steps. prompt.outputs.prompt }} "
2228 basePath : ${{ secrets.BASE_URL }}
You can’t perform that action at this time.
0 commit comments