Skip to content

Commit 9c07b2e

Browse files
authored
fix: prompt (#2193)
1 parent 105a630 commit 9c07b2e

File tree

4 files changed

+4
-32
lines changed

4 files changed

+4
-32
lines changed

.github/workflows/docs-commit.translate.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ jobs:
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: read_prompt
37-
run: |
38-
echo "prompt<<EOF" >> $GITHUB_OUTPUT
39-
cat .github/workflows/prompt.txt >> $GITHUB_OUTPUT
40-
echo "EOF" >> $GITHUB_OUTPUT
41-
4235
- name: Run GPT Translate
4336
4437
with:
@@ -47,5 +40,5 @@ jobs:
4740
inputFiles: "${{ steps.changed_files.outputs.files }}"
4841
outputFiles: "docs/cn/**/*.md"
4942
languages: "Simplified-Chinese"
50-
prompt: "${{ steps.read_prompt.outputs.prompt }}"
43+
prompt: "$(cat .github/workflows/prompt.txt)"
5144
basePath: ${{ secrets.BASE_URL }}

.github/workflows/docs-sync.translate.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ jobs:
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: read_prompt
51-
run: |
52-
echo "prompt<<EOF" >> $GITHUB_OUTPUT
53-
cat .github/workflows/prompt.txt >> $GITHUB_OUTPUT
54-
echo "EOF" >> $GITHUB_OUTPUT
55-
5649
- name: Run GPT Translate
5750
5851
with:
@@ -61,5 +54,5 @@ jobs:
6154
inputFiles: "${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
6255
outputFiles: "docs/cn/**/*.{md,json}"
6356
languages: "Simplified-Chinese"
64-
prompt: "${{ steps.read_prompt.outputs.prompt }}"
57+
prompt: "$(cat .github/workflows/prompt.txt)"
6558
basePath: ${{ secrets.BASE_URL }}

.github/workflows/docs.translate.dir.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ jobs:
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: read_prompt
51-
run: |
52-
echo "prompt<<EOF" >> $GITHUB_OUTPUT
53-
cat .github/workflows/prompt.txt >> $GITHUB_OUTPUT
54-
echo "EOF" >> $GITHUB_OUTPUT
55-
5649
- name: Run GPT Translate
5750
5851
with:
@@ -61,5 +54,5 @@ jobs:
6154
inputFiles: "${{ steps.check_missing.outputs.missing_md_files }}${{ steps.check_missing.outputs.missing_json_files }}"
6255
outputFiles: "docs/cn/**/*.{md,json}"
6356
languages: "Simplified-Chinese"
64-
prompt: "${{ steps.read_prompt.outputs.prompt }}"
57+
prompt: "$(cat .github/workflows/prompt.txt)"
6558
basePath: ${{ secrets.BASE_URL }}

.github/workflows/docs.translate.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,12 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- name: Read prompt from file
15-
id: read_prompt
16-
run: |
17-
echo "prompt<<EOF" >> $GITHUB_OUTPUT
18-
cat .github/workflows/prompt.txt >> $GITHUB_OUTPUT
19-
echo "EOF" >> $GITHUB_OUTPUT
20-
2114
- name: Run GPT Translate
2215
if: |
2316
contains(github.event.comment.body, '/gt')
2417
2518
with:
2619
apikey: ${{ secrets.API_KEY }}
2720
model: ${{ secrets.LLM_MODEL }}
28-
prompt: "${{ steps.read_prompt.outputs.prompt }}"
21+
prompt: "$(cat .github/workflows/prompt.txt)"
2922
basePath: ${{ secrets.BASE_URL }}

0 commit comments

Comments
 (0)