Skip to content

Commit 904ee4c

Browse files
DanWahlinCopilot
andcommitted
harden co-op image translation workflow
Split Markdown and image translation steps, save Co-op logs, add a job timeout, and limit source image triggers to Co-op-supported raster formats. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 649d05b commit 904ee4c

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/co-op-translator.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ on:
1010
- "**/*.png"
1111
- "**/*.jpg"
1212
- "**/*.jpeg"
13-
- "**/*.gif"
14-
- "**/*.svg"
13+
- "**/*.webp"
1514
- "!translations/**"
1615
- "!translated_images/**"
1716
- "!.github/**"
@@ -24,6 +23,7 @@ jobs:
2423
translate-content:
2524
name: Translate Markdown and Images
2625
runs-on: ubuntu-latest
26+
timeout-minutes: 90
2727

2828
env:
2929
TRANSLATION_LANGUAGES: "es"
@@ -56,9 +56,13 @@ jobs:
5656
python -m pip install --upgrade pip
5757
python -m pip install co-op-translator
5858
59-
- name: Translate Markdown and images
59+
- name: Translate Markdown
6060
run: |
61-
translate -l "$TRANSLATION_LANGUAGES" -md -img -y --repo-url "https://github.com/github/copilot-cli-for-beginners.git"
61+
translate -l "$TRANSLATION_LANGUAGES" -md -y -s --repo-url "https://github.com/github/copilot-cli-for-beginners.git"
62+
63+
- name: Translate images
64+
run: |
65+
translate -l "$TRANSLATION_LANGUAGES" -img -y -s --repo-url "https://github.com/github/copilot-cli-for-beginners.git"
6266
6367
- name: Normalize and review translations
6468
run: |
@@ -70,6 +74,14 @@ jobs:
7074
echo "co-op-review is not available in the installed Co-op Translator package; skipping."
7175
fi
7276
77+
- name: Upload Co-op Translator logs
78+
if: always()
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: co-op-translator-logs
82+
path: logs/
83+
if-no-files-found: ignore
84+
7385
- name: Create pull request
7486
uses: peter-evans/create-pull-request@v7
7587
with:

0 commit comments

Comments
 (0)