Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use centralized .mo action #62

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions .github/workflows/update-mo.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Update Translations
name: Update .mo files

on:
pull_request:
branches: [ dev ]
paths:
- 'languages/*.po'
workflow_dispatch:
Expand All @@ -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
Loading