Skip to content

OCRVS-8588

OCRVS-8588 #31

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# OpenCRVS is also distributed under the terms of the Civil Registration
# & Healthcare Disclaimer located at http://opencrvs.org/license.
#
# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
name: Check Missing Translation
on:
pull_request:
branches:
- '*'
jobs:
check-missing-translation:
runs-on: ubuntu-latest
steps:
- name: Create directory for core and countryconfig
run: |
mkdir -m 777 -p $HOME/core
mkdir -m 777 -p $HOME/countryconfig
- name: Clone countryconfig and check if there any branch exists with the same name like current branch
id: set_branch
run: |
cd $HOME/countryconfig
git clone https://github.com/opencrvs/opencrvs-countryconfig.git
cd opencrvs-countryconfig
if [ -z "$(git branch -a | grep ${{ github.head_ref }})" ]; then
echo "Branch ${{ github.head_ref }} does not exist in countryconfig, we will use the develop branch"
echo "working_branch='develop'" >> $GITHUB_OUTPUT
else
echo "Branch ${{ github.head_ref }} exists in countryconfig"
echo "working_branch='${{ github.head_ref }}'" >> $GITHUB_OUTPUT
fi
echo "countryconfig_path=$HOME/countryconfig/opencrvs-countryconfig" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Clone the Core repository
run: |
cd $HOME/core
acting_branch=${{steps.set_branch.outputs.working_branch}}
export COUNTRY_CONFIG_PATH=${{steps.set_branch.outputs.countryconfig_path}}
git clone https://github.com/opencrvs/opencrvs-core.git
cd ./opencrvs-core
git checkout $acting_branch
yarn install
cd ./packages/client
CI="true" yarn extract:translations