Files
suwayomi-material-you-webui/.github/workflows/update_i18n_languages.yml
schroda 4d573174c6 [skip ci] Fix i18n resource generator workflow skip condition
The commit message is the title plus description. Thus, using "endsWith" for matching the title does not work
2025-07-15 01:48:33 +02:00

46 lines
1.0 KiB
YAML

name: update_i18n_languages.yml
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-i18n:
if: >
github.event_name == 'workflow_dispatch' ||
contains(github.event.head_commit.message, 'Translations update from Hosted Weblate')
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
path: master
fetch-depth: 0
- name: Set up NodeJs
uses: actions/setup-node@v4
with:
node-version-file: './master/package.json'
- name: Cache node_modules
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: |
cd master
yarn ci
- name: Update i18n resources
run: |
cd master
echo '{"weblateToken": "${{ secrets.WEBLATE_TOKEN }}"}' > tools/scripts/tokens.json
yarn i18n:gen-resources