Skip to content

Commit f8046b2

Browse files
committed
script fix
1 parent e90a9cd commit f8046b2

File tree

1 file changed

+25
-33
lines changed

1 file changed

+25
-33
lines changed

.github/workflows/translate.yml

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
name: Translate to ${{ matrix.lang }}
1515
runs-on: ubuntu-latest
1616
strategy:
17+
fail-fast: false # If one language fails, let the others finish
1718
matrix:
1819
lang: [de, fr, es, ja, zh, pt, ko] # German, French, Spanish, Japanese, Chinese, Portuguese, Korean
1920
steps:
@@ -32,7 +33,7 @@ jobs:
3233
uses: actions/cache@v4
3334
with:
3435
path: ./models
35-
key: aya-expanse-8b-q4ks-v3
36+
key: aya-expanse-8b-q4ks-v4
3637

3738
- name: Install Dependencies
3839
run: |
@@ -48,38 +49,29 @@ jobs:
4849
- name: Run Translation Script
4950
run: python scripts/translate.py --lang ${{ matrix.lang }}
5051

51-
- name: Commit and Push
52-
run: |
53-
git config --global user.name "github-actions[bot]"
54-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
55-
git add locales/README.${{ matrix.lang }}.md
56-
git commit -m "docs: update ${{ matrix.lang }} translation" || echo "No changes to commit"
57-
git pull --rebase
58-
git push
59-
60-
# - name: Upload Translation Artifact
61-
# uses: actions/upload-artifact@v4
62-
# with:
63-
# name: readme-${{ matrix.lang }}
64-
# path: locales/README.${{ matrix.lang }}.md
52+
- name: Upload Translation Artifact
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: readme-${{ matrix.lang }}
56+
path: locales/README.${{ matrix.lang }}.md
6557

66-
# commit-translations:
67-
# needs: translate
68-
# runs-on: ubuntu-latest
69-
# steps:
70-
# - name: Checkout Code
71-
# uses: actions/checkout@v4
58+
commit-translations:
59+
needs: translate
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout Code
63+
uses: actions/checkout@v4
7264

73-
# - name: Download All Translations
74-
# uses: actions/download-artifact@v4
75-
# with:
76-
# pattern: readme-*
77-
# path: locales
78-
# merge-multiple: true
65+
- name: Download All Translations
66+
uses: actions/download-artifact@v4
67+
with:
68+
pattern: readme-*
69+
path: locales
70+
merge-multiple: true
7971

80-
# - name: Commit and Push Changes
81-
# uses: stefanzweifel/git-auto-commit-action@v5
82-
# with:
83-
# commit_message: "docs: update multilingual translations"
84-
# file_pattern: 'locales/*.md'
85-
# push_options: '--force-with-lease'
72+
- name: Commit and Push Changes
73+
uses: stefanzweifel/git-auto-commit-action@v5
74+
with:
75+
commit_message: "docs: update multilingual translations"
76+
file_pattern: 'locales/*.md'
77+
push_options: '--force-with-lease'

0 commit comments

Comments
 (0)