forked from elizaOS/eliza
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mike dupont
committed
Jan 9, 2025
1 parent
6ebef92
commit 999990f
Showing
7 changed files
with
103 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,89 @@ | ||
name: Generate Readme Translations | ||
on: | ||
push: | ||
branches: | ||
- "1222--README-ci-auto-translation" | ||
# name: Generate Readme Translations | ||
# on: | ||
# push: | ||
# branches: | ||
# - "1222--README-ci-auto-translation" | ||
|
||
jobs: | ||
translation: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
language: | ||
[ | ||
{ code: "CN", name: "Chinese" }, | ||
{ code: "DE", name: "German" }, | ||
{ code: "ES", name: "Spanish" }, | ||
{ code: "FR", name: "French" }, | ||
{ code: "HE", name: "Hebrew" }, | ||
{ code: "IT", name: "Italian" }, | ||
{ code: "JA", name: "Japanese" }, | ||
{ code: "KOR", name: "Korean" }, | ||
{ code: "PTBR", name: "Portuguese (Brazil)" }, | ||
{ code: "RU", name: "Russian" }, | ||
{ code: "TH", name: "Thai" }, | ||
{ code: "TR", name: "Turkish" }, | ||
{ code: "VI", name: "Vietnamese" }, | ||
] | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
token: ${{ secrets.GH_TOKEN }} | ||
# jobs: | ||
# translation: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# language: | ||
# [ | ||
# { code: "CN", name: "Chinese" }, | ||
# { code: "DE", name: "German" }, | ||
# { code: "ES", name: "Spanish" }, | ||
# { code: "FR", name: "French" }, | ||
# { code: "HE", name: "Hebrew" }, | ||
# { code: "IT", name: "Italian" }, | ||
# { code: "JA", name: "Japanese" }, | ||
# { code: "KOR", name: "Korean" }, | ||
# { code: "PTBR", name: "Portuguese (Brazil)" }, | ||
# { code: "RU", name: "Russian" }, | ||
# { code: "TH", name: "Thai" }, | ||
# { code: "TR", name: "Turkish" }, | ||
# { code: "VI", name: "Vietnamese" }, | ||
# ] | ||
# permissions: | ||
# contents: write | ||
# steps: | ||
# - uses: meta-introspector/checkout@v4 | ||
# with: | ||
# ref: main | ||
# token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Translate to ${{ matrix.language.name }} | ||
uses: 0xjord4n/[email protected] | ||
id: aixion | ||
with: | ||
config: > | ||
{ | ||
"provider": "openai", | ||
"provider_options": { | ||
"api_key": "${{ secrets.OPENAI_API_KEY }}" | ||
}, | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": "You will be provided with a markdown file in English, and your task is to translate it into ${{ matrix.language.name }}." | ||
}, | ||
{ | ||
"role": "user", | ||
"content_path": "README.md" | ||
} | ||
], | ||
"save_path": "README_${{ matrix.language.code }}.md", | ||
"model": "gpt-4o" | ||
} | ||
# - name: Translate to ${{ matrix.language.name }} | ||
# uses: 0xjord4n/[email protected] | ||
# id: aixion | ||
# with: | ||
# config: > | ||
# { | ||
# "provider": "openai", | ||
# "provider_options": { | ||
# "api_key": "${{ secrets.OPENAI_API_KEY }}" | ||
# }, | ||
# "messages": [ | ||
# { | ||
# "role": "system", | ||
# "content": "You will be provided with a markdown file in English, and your task is to translate it into ${{ matrix.language.name }}." | ||
# }, | ||
# { | ||
# "role": "user", | ||
# "content_path": "README.md" | ||
# } | ||
# ], | ||
# "save_path": "README_${{ matrix.language.code }}.md", | ||
# "model": "gpt-4o" | ||
# } | ||
|
||
# Upload each translated file as an artifact | ||
- name: Upload translation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: readme-${{ matrix.language.code }} | ||
path: README_${{ matrix.language.code }}.md | ||
# # Upload each translated file as an artifact | ||
# - name: Upload translation | ||
# uses: meta-introspector/upload-artifact@v4 | ||
# with: | ||
# name: readme-${{ matrix.language.code }} | ||
# path: README_${{ matrix.language.code }}.md | ||
|
||
commit: | ||
needs: translation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
token: ${{ secrets.GH_TOKEN }} | ||
# commit: | ||
# needs: translation | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: meta-introspector/checkout@v4 | ||
# with: | ||
# ref: main | ||
# token: ${{ secrets.GH_TOKEN }} | ||
|
||
# Download all translation artifacts | ||
- name: Download all translations | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: readme-* | ||
merge-multiple: true | ||
# # Download all translation artifacts | ||
# - name: Download all translations | ||
# uses: meta-introspector/download-artifact@v4 | ||
# with: | ||
# pattern: readme-* | ||
# merge-multiple: true | ||
|
||
- name: Commit all translations | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "chore: update all README translations" | ||
branch: main | ||
file_pattern: "README_*.md" | ||
commit_author: "GitHub Action <[email protected]>" | ||
# - name: Commit all translations | ||
# uses: stefanzweifel/git-auto-commit-action@v5 | ||
# with: | ||
# commit_message: "chore: update all README translations" | ||
# branch: main | ||
# file_pattern: "README_*.md" | ||
# commit_author: "GitHub Action <[email protected]>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters