Files
element-call-Github/.github/workflows/translations-download.yaml
2025-12-01 11:00:52 +00:00

61 lines
1.7 KiB
YAML

name: Download translation files from Localazy
on:
workflow_dispatch:
secrets:
ELEMENT_BOT_TOKEN:
required: true
jobs:
download:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout the code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: "yarn"
node-version-file: ".node-version"
- name: Install Deps
run: "yarn install --immutable"
- name: Prune i18n
run: "rm -R locales"
- name: Download translation files
uses: localazy/download@0a79880fb66150601e3b43606fab69c88123c087 # v1.1.0
with:
groups: "-p includeSourceLang:true"
- name: Fix the owner of the downloaded files
run: "sudo chown runner:docker -R locales"
- name: Prettier
run: yarn prettier:format
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/localazy-download
delete-branch: true
title: Localazy Download
commit-message: Translations updates
labels: |
T-Task
- name: Enable automerge
run: gh pr merge --merge --auto "$PR_NUMBER"
if: steps.cpr.outputs.pull-request-operation == 'created'
env:
GH_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}