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'
|
2023-02-17 09:47:49 +03:00
|
|
|
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:
|
2023-03-04 09:07:09 +03:00
|
|
|
runs-on: ubuntu-latest
|
2023-01-12 08:02:32 +03:00
|
|
|
steps:
|
2023-03-04 09:07:09 +03:00
|
|
|
- uses: actions/checkout@v3
|
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'
|
2023-09-15 03:37:32 +03:00
|
|
|
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'
|
2023-09-15 03:37:32 +03:00
|
|
|
run: yarn workspace @affine/i18n run sync-languages
|
2023-01-12 08:02:32 +03:00
|
|
|
env:
|
|
|
|
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
|