Skip to content

Merge pull request #772 from PrestaShopCorp/feature/MME-331/cloudsync… #2004

Merge pull request #772 from PrestaShopCorp/feature/MME-331/cloudsync…

Merge pull request #772 from PrestaShopCorp/feature/MME-331/cloudsync… #2004

Workflow file for this run

name: Translations
on:
push:
pull_request:
types: labeled
jobs:
sync-translations:
name: Extract translations and submit a PR
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'translations_update')
steps:
- name: Checkout module-translation-tool
uses: actions/[email protected]
with:
repository: PrestaShopCorp/module-translation-tool
ref: main
- name: Create config for module-translation-tool
run: |
ls
cp ./module.cfg.example ./module.cfg
sed -i 's#^MODULE_NAME.*#MODULE_NAME="ps_mbo"#g' ./module.cfg
sed -i 's#^GIT_REPO_USERNAME.*#GIT_REPO_USERNAME="PrestaShopCorp"#g' ./module.cfg
sed -i 's#^GIT_REPO_NAME.*#GIT_REPO_NAME="ps_mbo"#g' ./module.cfg
sed -i 's#^BRANCH.*#BRANCH="${{ github.head_ref }}"#g' ./module.cfg
- name: Setup git config
run: |
echo "${{ secrets.MODULE_TRANSLATION_TOOL_ACCESS_TOKEN }}"
git config --global user.name "Github Actions - Module translation tool"
git config --global user.email "<>"
git config --global credential.helper 'cache --timeout 3600'
git config --global url."https://oauth2:${{ secrets.MODULE_TRANSLATION_TOOL_ACCESS_TOKEN }}@github.com".insteadOf ssh://[email protected]
- run: composer install
- name: Extract translations and push
run: |
printenv
/bin/bash -eux ./scripts/extractCatalogue.sh
/bin/bash -eux ./scripts/pushAndCreatePullRequest.sh
env:
APP_GITHUB_TOKEN: ${{ secrets.MODULE_TRANSLATION_TOOL_ACCESS_TOKEN }}