Skip to content

chore: register otter product page #3263

chore: register otter product page

chore: register otter product page #3263

name: Translations Diff
on:
pull_request_review:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches:
- 'development'
- 'new/**'
jobs:
translation:
runs-on: ubuntu-latest
steps:
- name: Checkout Ref Base
uses: actions/checkout@v2
with:
path: neve-head
- name: Setup node 14
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: FRESH Makepot BASE
run: |
cd neve-head
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn install --frozen-lockfile
yarn run build
ls languages/
- name: Checkout Ref Head
uses: actions/checkout@v2
with:
ref: development
path: neve-base
- name: FRESH Makepot HEAD
run: |
cd neve-base
ls languages/
composer install --no-dev --prefer-dist --no-progress --no-suggest
yarn install --frozen-lockfile
yarn run build
ls languages/
- name: Find Comment
uses: peter-evans/find-comment@v1
id: find_coomment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'pirate-bot'
body-includes: PR has POT difference
- name: Install PODiff
run: |
curl -o podiff.gz ftp://download.gnu.org.ua/pub/releases/podiff/podiff-1.3.tar.gz
tar -xf podiff.gz
cd podiff-1.3
make
mkdir -p $GITHUB_WORKSPACE/bin
mv ./podiff $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
cd ..
- name: Run Podiff
id: translation_status
run: |
${GITHUB_WORKSPACE}/neve-head/bin/pot-diff.sh ./neve-base/languages/neve.pot ./neve-head/languages/neve.pot $PERCENT_TRESHOLD
- name: Step require review
if: steps.translation_status.outputs.has_pot_diff != 'success'
uses: Automattic/action-required-review@v2
with:
requirements: |
- name: Everything else
paths: unmatched
teams:
- "admin-neve"
status: Has translation changes, a review admin-neve team is required
token: ${{ secrets.BOT_TOKEN }}