mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Update CI job
This commit is contained in:
parent
8497c3f60b
commit
cf1f46fa5e
32
.github/workflows/translations.yml
vendored
32
.github/workflows/translations.yml
vendored
@ -1,20 +1,44 @@
|
|||||||
name: Crowdin Action
|
name: Translation job
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [translations]
|
paths:
|
||||||
|
- 'web/i18n/**'
|
||||||
|
- 'crowdin.yml'
|
||||||
|
- '.github/workflows/translations.yml'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
synchronize-with-crowdin:
|
generate-translations:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./web
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: ${{ github.actor != 'renovate[bot]' && github.actor != 'renovate' }}
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Generate translation files
|
||||||
|
run: npm run translate
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
uses: EndBug/add-and-commit@v9
|
||||||
|
with:
|
||||||
|
author_name: Owncast
|
||||||
|
author_email: owncast@owncast.online
|
||||||
|
message: 'Commit updated translations'
|
||||||
|
add: 'web/i18n/**'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Crowdin action
|
- name: Crowdin action
|
||||||
uses: crowdin/github-action@v1
|
uses: crowdin/github-action@v1
|
||||||
with:
|
with:
|
||||||
@ -23,6 +47,6 @@ jobs:
|
|||||||
localization_branch_name: translations
|
localization_branch_name: translations
|
||||||
config: crowdin.yml
|
config: crowdin.yml
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
'commit_message': 'Updated translations for %two_letters_code%'
|
'commit_message': 'Updated translations for %two_letters_code%'
|
||||||
|
|
||||||
files:
|
files:
|
||||||
- source: web/i18n/*.json
|
- source: web/i18n/translations.*.json
|
||||||
translation: web/i18n/%original_file_name%
|
translation: web/i18n/%locale%
|
||||||
|
|
||||||
project_id_env: CROWDIN_PROJECT_ID
|
project_id_env: CROWDIN_PROJECT_ID
|
||||||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user