-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (50 loc) · 1.58 KB
/
action.yml
File metadata and controls
54 lines (50 loc) · 1.58 KB
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
name: "S.S. Markdown"
description: "Translates markdown files using various AI models"
inputs:
file:
description: "Path to the markdown file to translate"
required: true
default: "README.md"
openai-api-key:
description: "OpenAI API Key"
required: false
deepseek-api-key:
description: "DeepSeek API Key"
required: false
google-api-key:
description: "Google API Key"
required: false
google-model:
description: "Google Generative AI model name"
required: false
openai-model:
description: "OpenAI model name"
required: false
ss-model:
description: "SS model configuration"
required: true
languages:
description: "Languages to translate to"
required: false
default: en,zh,fr,es,de,ko
runs:
using: "composite"
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Install dependencies
shell: bash
run: go mod tidy
working-directory: ${{ github.action_path }}
- name: Run translation script
shell: bash
working-directory: ${{ github.action_path }}
env:
SS_MARKDOWN_OPENAI_API_KEY: ${{ inputs.openai-api-key }}
SS_MARKDOWN_DEEPSEEK_API_KEY: ${{ inputs.deepseek-api-key }}
SS_MARKDOWN_GOOGLE_API_KEY: ${{ inputs.google-api-key }}
SS_MARKDOWN_GOOGLE_GENERATIVE_MODEL: ${{ inputs.google-model }}
SS_MARKDOWN_OPENAI_GENERATIVE_MODEL: ${{ inputs.openai-model }}
SS_MARKDOWN_MODEL: ${{ inputs.ss-model }}
run: go run translate.go $GITHUB_WORKSPACE/${{ inputs.file }} $GITHUB_WORKSPACE "${{ inputs.languages }}"