2021-09-03 16:42:52 +02:00
|
|
|
name: Autoreformat locale files
|
2021-09-03 16:35:03 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
jobs:
|
|
|
|
i18n:
|
2021-09-03 16:42:52 +02:00
|
|
|
name: Autoreformat locale files
|
2021-09-03 16:35:03 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Apply reformating scripts
|
|
|
|
id: action_reformat
|
|
|
|
run: |
|
|
|
|
python3 test/remove_stale_i18n_strings.py
|
|
|
|
python3 test/autofix_locale_format.py
|
|
|
|
python3 test/reformat_locales.py
|
2021-09-03 16:39:51 +02:00
|
|
|
git diff -w --exit-code
|
2021-09-03 16:37:08 +02:00
|
|
|
- name: Create Pull Request
|
|
|
|
if: ${{ failure() }}
|
|
|
|
uses: peter-evans/create-pull-request@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
title: "Reformat locale files"
|
|
|
|
commit-message: ":robot: Reformat locale files"
|
2021-09-03 16:42:52 +02:00
|
|
|
body: |
|
|
|
|
Automatic pull request using the scripts in `test/`
|
2021-09-03 16:37:08 +02:00
|
|
|
base: ${{ github.head_ref }}
|
2021-09-03 16:42:52 +02:00
|
|
|
branch: actions/i18nreformat
|