Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Fix PO generation workflow #1550

Merged
merged 3 commits into from
Jul 1, 2022
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
19 changes: 15 additions & 4 deletions .github/workflows/generate_pot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate translation POT file
name: Generate translation PO file

on:
push:
Expand All @@ -11,21 +11,32 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main

- uses: ./.github/actions/setup-node-env

- name: Generate POT
- name: Generate PO
run: pnpm i18n:generate-pot

- name: Copy to root
run: cp ./openverse.pot /tmp/openverse.pot

- name: Update POT on translations branch
- name: Checkout `translations` branch
uses: actions/checkout@v3
with:
ref: translations

- name: Update POT on `translations` branch
run: |
git checkout translations
rm openverse.pot
cp /tmp/openverse.pot openverse.pot
git config --global user.name 'POT Updater'
git config --global user.email 'openverse@wordpress.org'
git commit -am 'Update POT file'
git push

- name: Re-checkout `main` branch to allow for cleanup to work
uses: actions/checkout@v3
with:
ref: main