Update trigger events

- Don't run if commits are all in 'locale' directory
  - Allows pushing changes back into nightly from this workflow without triggering and endless loop
- Don't run job unless event is 'pull_request.merged'
This commit is contained in:
ReenigneArcher 2022-03-11 13:48:24 -05:00
parent 88cf616a48
commit 01155ef4a3

View File

@ -3,11 +3,14 @@ name: localize
on:
push:
branches: [nightly]
paths-ignore:
- 'locale/**'
workflow_dispatch:
jobs:
localize:
name: Update Localization
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -20,7 +23,7 @@ jobs:
- name: Set up Python 3.9 Dependencies
run: |
cd ./locale
cd ./scripts
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
@ -32,7 +35,7 @@ jobs:
- name: Update Strings
run: |
python ./locale/_locale.py --extract --init --update
python ./scripts/_locale.py --extract --init --update
- name: GitHub Commit & Push # push changes back into nightly
uses: actions-js/push@v1.2