cherry-studio/.github/workflows/auto-i18n.yml
Phantom b9ae3128e3
Potential fix for code scanning alert no. 48: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-09-04 17:32:14 +08:00

40 lines
855 B
YAML

name: Auto I18N
env:
API_KEY: ${{ secrets.TRANSLATE_API_KEY}}
MODEL: ${{ vars.MODEL || 'deepseek/deepseek-v3.1'}}
BASE_URL: ${{ vars.BASE_URL || 'https://api.ppinfra.com/openai'}}
on:
push:
branches: [main]
workflow_dispatch:
jobs:
auto-i18n:
runs-on: ubuntu-latest
name: Auto I18N
permissions:
contents: write
steps:
- name: 🐈‍⬛ Checkout
uses: actions/checkout@v5
- name: 📦 Setting Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 📦 Dependencies
run: npm install openai cli-progress tsx
- name: 🏃‍♀️ Translate
run: tsx scripts/update-i18n.ts
- name: 🚀 Push changes
uses: ad-m/git-push@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main