This commit is contained in:
Oliver Walters 2022-05-01 23:21:49 +10:00
parent 9e469a949f
commit 8635cb8267

View File

@ -19,34 +19,30 @@ jobs:
INVENTREE_STATIC_ROOT: ./static INVENTREE_STATIC_ROOT: ./static
steps: steps:
- uses: actions/checkout@v2 - name: Checkout Code
- name: Get Current Translations uses: actions/checkout@v2
run: | - name: Set up Python 3.7
git fetch uses: actions/setup-python@v1
git checkout origin/l10 -- `git ls-tree origin/l10 -r --name-only | grep ".po"` with:
git reset python-version: 3.7
- name: Set up Python 3.7 - name: Install Dependencies
uses: actions/setup-python@v1 run: |
with: sudo apt-get update
python-version: 3.7 sudo apt-get install -y gettext
- name: Install Dependencies pip3 install invoke
run: | invoke install
sudo apt-get update - name: Make Translations
sudo apt-get install -y gettext run: |
pip3 install invoke invoke translate
invoke install - name: Commit files
- name: Make Translations run: |
run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
invoke translate git config --local user.name "github-actions[bot]"
- name: Commit files git checkout -b l10_local
run: | git add "*.po"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git commit -m "updated translation base"
git config --local user.name "github-actions[bot]" - name: Push changes
git checkout -b l10_local uses: ad-m/github-push-action@master
git add "*.po" with:
git commit -m "updated translation base" github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes branch: l10
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: l10