Skip to content

Update Translations #31

Update Translations

Update Translations #31

Workflow file for this run

name: Update Translations
on:
workflow_dispatch:
schedule:
# At 00:00 on Sunday.
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
update-translations:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build Node.js cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node
- name: Install dependencies
run: npm ci
- name: Update locales data
run: |
curl -H 'X-API-KEY: ${{ secrets.TOLGEE_TOKEN }}' 'https://app.tolgee.io/v2/projects/export' -o locales.zip
unzip -o -d ./src/locales locales.zip
rm locales.zip
- name: Update locales metadata
uses: VueTorrent/tolgee-action@v1
with:
tolgee_secret: ${{ secrets.TOLGEE_TOKEN }}
- name: Lint
run: npm run lint
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
base: master
commit-message: 'chore: update translations'
branch: 'update-tolgee-translations'
title: 'chore: update translations'
delete-branch: true