-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (39 loc) · 1.37 KB
/
update-pot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update POT file
on:
push:
branches:
- dev
paths:
- '**.php'
- '**.js'
workflow_dispatch:
jobs:
update-pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer, wp-cli/wp-cli-bundle
- name: Update POT file
run: wp i18n make-pot . languages/pressbooks-aldine.pot --domain=pressbooks-aldine --slug=pressbooks-aldine --package-name="Aldine" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-aldine/issues\"}"
- name: Create Pull Request for POT file
id: cprpot
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
labels: automerge-pot
commit-message: 'chore(l10n): update pot file'
title: 'chore(l10n): update pot file'
body: 'This pull request updates the POT file for this theme.'
branch: chore/update-pot-file
- name: Merge pull request with updated POT file
if: ${{ steps.cprpot.outputs.pull-request-number }}
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: automerge-pot
MERGE_METHOD: squash
PULL_REQUEST: "${{ steps.cprpot.outputs.pull-request-number }}"