mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 11:10:43 +08:00
ci(i18n): auto-bake note keys on template JSON changes in CI
Extends gp-backend-check.yml to trigger on starter_projects/** changes and runs bake_note_keys.py before extract_backend_strings.py so any new noteNodes get i18n_key stamped automatically on PR branches.
This commit is contained in:
9
.github/workflows/gp-backend-check.yml
vendored
9
.github/workflows/gp-backend-check.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/lfx/src/lfx/components/**"
|
||||
- "src/backend/base/langflow/initial_setup/starter_projects/**"
|
||||
|
||||
jobs:
|
||||
auto-commit:
|
||||
@ -22,6 +23,9 @@ jobs:
|
||||
ref: ${{ github.head_ref }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Bake i18n_key into template noteNodes
|
||||
run: python scripts/gp/bake_note_keys.py
|
||||
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
@ -35,10 +39,11 @@ jobs:
|
||||
- name: Generate en.json
|
||||
run: uv run python scripts/gp/extract_backend_strings.py
|
||||
|
||||
- name: Commit updated en.json to PR branch if changed
|
||||
- name: Commit updated files to PR branch if changed
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add src/backend/base/langflow/initial_setup/starter_projects/
|
||||
git add src/backend/base/langflow/locales/en.json
|
||||
git diff --staged --quiet || git commit -m "chore: auto-regenerate backend locales/en.json [skip ci]"
|
||||
git diff --staged --quiet || git commit -m "chore: auto-bake note keys and regenerate backend locales/en.json [skip ci]"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user