Browse Source

Update CI flow

pull/344/head
SteelWagstaff 3 years ago
parent
commit
a687bfd4a7
  1. 6
      .github/workflows/build-and-lint.yml
  2. 6
      .github/workflows/standards-and-tests.yml
  3. 16
      .github/workflows/update-pot.yml
  4. 16
      .github/workflows/update-translations.yml

6
.github/workflows/build-and-lint.yml

@ -15,13 +15,13 @@ jobs:
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}

6
.github/workflows/standards-and-tests.yml

@ -15,7 +15,7 @@ jobs:
matrix:
php: [ 7.4 ]
os: [ ubuntu-20.04 ]
wordpress: [ 5.9.3, latest ]
wordpress: [ '6.0', latest ]
experimental: [ false ]
include:
- php: 8.0
@ -30,13 +30,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Start required services
run: sudo systemctl start mysql.service
- name: Cache PHP dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}

16
.github/workflows/update-pot.yml

@ -12,7 +12,7 @@ jobs:
update-pot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
@ -20,14 +20,8 @@ jobs:
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\"}"
# Remove this step once you are satisfied with the results; alternatively, you can leave it in place and remove
# the commented out step that follows.
- name: Open PR with changes
uses: peter-evans/create-pull-request@v4
- name: Commit updated POT file
uses: stefanzweifel/git-auto-commit-action@v4.1.1
with:
title: 'chore(l10n): update languages/pressbooks-aldine.pot'
# - name: Commit updated POT file
# uses: stefanzweifel/git-auto-commit-action@v4.1.1
# with:
# commit_message: 'chore(l10n): update languages/pressbooks-aldine.pot'
# file_pattern: '*.pot'
commit_message: 'chore(l10n): update languages/pressbooks-aldine.pot'
file_pattern: '*.pot'

16
.github/workflows/update-translations.yml

@ -6,7 +6,7 @@ jobs:
update-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Install Transifex Client
@ -22,14 +22,8 @@ jobs:
tools: composer, wp-cli/wp-cli-bundle
- name: Generate MO files
run: wp i18n make-mo languages
# Remove this step once you are satisfied with the results; alternatively, you can leave it in place and remove
# the commented out step that follows.
- name: Open PR with changes
uses: peter-evans/create-pull-request@v4
- name: Commit updated translation files
uses: stefanzweifel/git-auto-commit-action@v4.13.1
with:
title: 'chore(l10n): update translations'
# - name: Commit updated translation files
# uses: stefanzweifel/git-auto-commit-action@v4.13.1
# with:
# commit_message: 'chore(l10n): update translations'
# file_pattern: '*.mo'
commit_message: 'chore(l10n): update translations'
file_pattern: '*.mo'

Loading…
Cancel
Save