mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🤖 ci: locize-pull-published-sync-pr.yml (#5762)
* fix: ci for locize-pull-published-sync-pr.yml * fix: ci for locize-pull-published-sync-pr.yml * fixed missing parameter: base: main
This commit is contained in:
parent
86134415e9
commit
96f1133f0d
1 changed files with 24 additions and 27 deletions
|
|
@ -1,53 +1,50 @@
|
||||||
name: Locize Version Published Workflow
|
name: Create Translation PR on Version Published
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# testing
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [locize/versionPublished]
|
types: [locize/versionPublished]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
locize_update:
|
createPullRequest:
|
||||||
name: Process Locize Version Published Event
|
name: Create Translation PR on Version Published
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# 1. Check out the repository.
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Display Dispatch Payload
|
# 2. Download translation files from locize.
|
||||||
run: |
|
|
||||||
echo "Received Version: ${{ github.event.client_payload.payload.version }}"
|
|
||||||
echo "Full Payload: ${{ toJson(github.event.client_payload) }}"
|
|
||||||
- name: Download Translations from locize
|
- name: Download Translations from locize
|
||||||
uses: locize/download@v1
|
uses: locize/download@v1
|
||||||
with:
|
with:
|
||||||
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
|
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
|
||||||
version: ${{ github.event.client_payload.payload.version }}
|
|
||||||
path: "client/src/locales"
|
path: "client/src/locales"
|
||||||
path-mask: "{{language}}/{{namespace}}"
|
|
||||||
clean: true # Ensures old translation files are removed before downloading new ones
|
|
||||||
|
|
||||||
|
# 3. Create a Pull Request using built-in functionality.
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: create_pr
|
uses: peter-evans/create-pull-request@v7
|
||||||
uses: peter-evans/create-pull-request@v7.0.6
|
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-message: "chore: update translations from locize"
|
sign-commits: true
|
||||||
branch: locize-update-${{ github.event.client_payload.payload.version }}
|
commit-message: "🌍 i18n: Update translation.json with latest translations"
|
||||||
delete-branch: true
|
base: main
|
||||||
title: "chore: update translations from locize"
|
branch: i18n/locize-translation-update
|
||||||
|
reviewers: danny-avila
|
||||||
|
title: "🌍 i18n: Update translation.json with latest translations"
|
||||||
body: |
|
body: |
|
||||||
This PR updates translations from locize.
|
**Description**:
|
||||||
- Version: `${{ github.event.client_payload.payload.version }}`
|
- 🎯 **Objective**: Update `translation.json` with the latest translations from locize.
|
||||||
- Automated update from GitHub Actions
|
- 🔍 **Details**: This PR is automatically generated upon receiving a versionPublished event with version "latest". It reflects the newest translations provided by locize.
|
||||||
labels: "translations, automated"
|
- ✅ **Status**: Ready for review.
|
||||||
draft: false
|
labels: |
|
||||||
|
🌍 i18n
|
||||||
- name: Check PR Outputs
|
|
||||||
if: steps.create_pr.outputs.pull-request-number
|
|
||||||
run: |
|
|
||||||
echo "Pull Request Number - ${{ steps.create_pr.outputs.pull-request-number }}"
|
|
||||||
echo "Pull Request URL - ${{ steps.create_pr.outputs.pull-request-url }}"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue