Skip to content

Commit

Permalink
CI: add issue triggered translate
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Dec 18, 2023
1 parent af3701b commit d494964
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/gpt-translate-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GPT Translate

on:
issue_comment:
types: [ created ]

jobs:
gpt_translate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run GPT Translate
if: |
contains(github.event.comment.body, '/gpt-translate') ||
contains(github.event.comment.body, '/gt')
# uses: 3ru/gpt-translate@master
uses: drmingdrmer/gpt-translate@master
with:
apikey: ${{ secrets.OPENAI_API_KEY_JUNJUN }}
prompt: |
You are an expert in this area.
Please translate the given markdown into naturalistic {targetLanguage}.
Keep links and images.

0 comments on commit d494964

Please sign in to comment.