⚡ Simplify the display of the catalog page. #2024
Workflow file for this run
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
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 }} |