AFFiNE/.github/workflows/languages-sync.yml

36 lines
973 B
YAML
Raw Normal View History

2023-01-12 08:02:32 +03:00
name: Languages Sync
on:
2023-01-12 09:16:49 +03:00
push:
branches: ['master']
paths:
- 'packages/i18n/**'
- '.github/workflows/languages-sync.yml'
2023-06-17 12:49:07 +03:00
- '!.github/actions/setup-node/action.yml'
pull_request_target:
2023-01-12 09:16:49 +03:00
branches: ['master']
paths:
- 'packages/i18n/**'
- '.github/workflows/languages-sync.yml'
2023-06-17 12:49:07 +03:00
- '!.github/actions/setup-node/action.yml'
2023-01-12 08:02:32 +03:00
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
2023-01-12 08:02:32 +03:00
steps:
- uses: actions/checkout@v4
2023-03-24 18:44:14 +03:00
- name: Setup Node.js
uses: ./.github/actions/setup-node
2023-01-12 08:02:32 +03:00
- name: Check Language Key
if: github.ref != 'refs/heads/master'
run: yarn workspace @affine/i18n run sync-languages:check
2023-01-12 08:02:32 +03:00
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
- name: Sync Languages
if: github.ref == 'refs/heads/master'
run: yarn workspace @affine/i18n run sync-languages
2023-01-12 08:02:32 +03:00
env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}