From bef61b457b30443f62f58ec24b3eac3efbb8274b Mon Sep 17 00:00:00 2001 From: SteelWagstaff Date: Tue, 27 Feb 2024 14:19:41 -0800 Subject: [PATCH] chore: use centralized .mo action --- .github/workflows/update-mo.yml | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/update-mo.yml b/.github/workflows/update-mo.yml index 13f44f27..d81e9ec2 100644 --- a/.github/workflows/update-mo.yml +++ b/.github/workflows/update-mo.yml @@ -1,7 +1,8 @@ -name: Update Translations +name: Update .mo files on: pull_request: + branches: [ dev ] paths: - 'languages/*.po' workflow_dispatch: @@ -10,28 +11,4 @@ jobs: update-mo-files: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - fetch-depth: 0 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - tools: wp-cli/wp-cli-bundle - - - name: Generate .mo files from .po files - run: wp i18n make-mo languages - - - name: Configure Git - run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" - - - name: Commit and push .mo files - run: | - git add -A - git commit -m "chore: update .mo files" - git push origin ${{ github.head_ref }} + - uses: pressbooks/reusable-workflows/.github/workflows/update-translations.yml@dev