mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02: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:
|
||||
# testing
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches: [main]
|
||||
repository_dispatch:
|
||||
types: [locize/versionPublished]
|
||||
|
||||
jobs:
|
||||
locize_update:
|
||||
name: Process Locize Version Published Event
|
||||
createPullRequest:
|
||||
name: Create Translation PR on Version Published
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
# 1. Check out the repository.
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Display Dispatch Payload
|
||||
run: |
|
||||
echo "Received Version: ${{ github.event.client_payload.payload.version }}"
|
||||
echo "Full Payload: ${{ toJson(github.event.client_payload) }}"
|
||||
# 2. Download translation files from locize.
|
||||
- name: Download Translations from locize
|
||||
uses: locize/download@v1
|
||||
with:
|
||||
project-id: ${{ secrets.LOCIZE_PROJECT_ID }}
|
||||
version: ${{ github.event.client_payload.payload.version }}
|
||||
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
|
||||
id: create_pr
|
||||
uses: peter-evans/create-pull-request@v7.0.6
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "chore: update translations from locize"
|
||||
branch: locize-update-${{ github.event.client_payload.payload.version }}
|
||||
delete-branch: true
|
||||
title: "chore: update translations from locize"
|
||||
sign-commits: true
|
||||
commit-message: "🌍 i18n: Update translation.json with latest translations"
|
||||
base: main
|
||||
branch: i18n/locize-translation-update
|
||||
reviewers: danny-avila
|
||||
title: "🌍 i18n: Update translation.json with latest translations"
|
||||
body: |
|
||||
This PR updates translations from locize.
|
||||
- Version: `${{ github.event.client_payload.payload.version }}`
|
||||
- Automated update from GitHub Actions
|
||||
labels: "translations, automated"
|
||||
draft: false
|
||||
|
||||
- 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 }}"
|
||||
**Description**:
|
||||
- 🎯 **Objective**: Update `translation.json` with the latest translations from locize.
|
||||
- 🔍 **Details**: This PR is automatically generated upon receiving a versionPublished event with version "latest". It reflects the newest translations provided by locize.
|
||||
- ✅ **Status**: Ready for review.
|
||||
labels: |
|
||||
🌍 i18n
|
Loading…
Add table
Add a link
Reference in a new issue