Skip to content

Commit

Permalink
update pot workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Jan 14, 2024
1 parent 873b4b8 commit 793ecb8
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/update-pot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,16 @@ jobs:
- name: Update POT file
run: wp i18n make-pot . languages/woocommerce-pos.pot --domain=woocommerce-pos --slug=woocommerce-pos --package-name="WooCommerce POS" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/wcpos/woocommerce-pos/issues\"}"

- name: Check for changes
id: git-diff
run: |
git diff --exit-code || echo "::set-output name=changes::true"
- name: Commit updated POT file
if: steps.git-diff.outputs.changes == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore(l10n): update languages/woocommerce-pos.pot'
file_pattern: '*.pot'
push_options: '--dry-run' # We just want to check the diff first

- name: Check git diff
uses: technote-space/get-diff-action@v6
with:
SET_ENV_NAME_COUNT: 'FILE_COUNT'
SET_ENV_NAME_LINES: 'LINE_COUNT'
PATTERNS: |
'*.pot'
- name: Commit updated POT file
if: env.FILE_COUNT != env.LINE_COUNT
uses: stefanzweifel/git-auto-commit-action@v4


0 comments on commit 793ecb8

Please sign in to comment.