OCRVS-8588 #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
working_branch='develop' | |
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 | |
echo "the value of working branch is $working_branch" | |
git checkout $working_branch | |
cc_branch=$(git branch --show-current) | |
echo "Current branch in CC after checkout is: $cc_branch" | |
- name: Debugging the cc branch | |
run: | | |
cc_path=${{steps.set_branch.outputs.countryconfig_path}} | |
cd $cc_path | |
current_branch=$(git branch --show-current) | |
echo "Current branch is: $current_branch" | |
- 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 | |